placeos-driver

Version, currently 8.1.4100 versions

github.com/PlaceOS/driver

PlaceOS driver framework.

3 stars
0 dependents
License: NOASSERTION

Installation

# Add this to your shard.yml
dependencies:
  placeos-driver:
    github: PlaceOS/driver
    version: ~> 8.1.4

Then run:

shards install

shard.yml

Crystal
no constraint declared

Dependencies

Runtime Dependencies

  • dns*github: spider-gazelle/dns
  • dtls~> 0.9github: spider-gazelle/crystal-dtls
  • ssh2~> 1.5github: spider-gazelle/ssh2.cr
  • debug*github: Sija/debug.cr
  • tasker~> 3.0github: spider-gazelle/tasker
  • crunits*github: spider-gazelle/crunits
  • promise~> 3.0github: spider-gazelle/promise
  • ipaddress*github: Sija/ipaddress.cr
  • tokenizer~> 1.0github: spider-gazelle/tokenizer
  • json-schema*github: spider-gazelle/json-schema
  • simple_retry*github: spider-gazelle/simple_retry
  • connect-proxy~> 2.0github: spider-gazelle/connect-proxy
  • redis-cluster>= 0.8.6github: place-labs/redis-cluster.cr
  • action-controller*github: spider-gazelle/action-controller
  • placeos-core-client~> 0.5github: placeos/core-client
  • redis_service_manager>= 3.0.0github: place-labs/redis_service_manager

Development Dependencies

  • ameba*github: crystal-ameba/amebadev
  • s2_cells*github: spider-gazelle/s2_cellsdev

README

PlaceOS Driver

CI

The framework for running drivers on PlaceOS.

Requirements

  • libssh2 required for SSH support

Transport selection

Only the transports a driver declares are compiled into the binary, based on the discovery settings in the driver class body:

DeclarationTransports compiled
tcp_port 1234TCP + SSH
udp_port 1234UDP
uri_base "https://..."HTTP + websocket
none of the abovelogic only

Starting a module with a role the driver was not compiled for raises at module start, for example: driver was not compiled with HTTP transport support, declare 'uri_base' in the driver to enable it.

All transports can be forced into a binary with the -Dplaceos_all_transports compiler flag, by setting the PLACEOS_ALL_TRANSPORTS env var at build time, or by calling PlaceOS::Driver.load_all_transports after requiring the library. The test-harness sets the env var on its build service, as DriverSpecs launches every driver against a mock raw TCP server (role: 1) plus a mock HTTP server, regardless of the transports the driver uses in production.