[][src]Module transistor::docker

Docker Client module. It has the basic struct Crux which contains the CruxClient for Docker. Contains the following functions:

  • state queries endpoint / with a GET. No args.
  • tx_log requests endpoint /tx-log via POST. A Vector of Action is expected as argument.
  • tx_logs resquests endpoint /tx-log via GET. No args.
  • entity requests endpoint /entity via POST. A serialized CruxId, serialized Edn::Key or a String containing a keyword must be passed as argument.
  • document_by_id resquests endpoint /document/{:content-hash} via GET. {:content-hash} can be obtained with function entity_tx.
  • documents resquests endpoint /documents via POST. The argument of this reuqest is a vector of content-hashes that converts to an edn set as a body.

Enum Action is available in this module

Structs

Crux

Struct to connect define parameters to connect to Crux host and port are reuired.

CruxClient

CruxClient has the reqwest::Client, the uri to query and the HeaderMap with all the possible headers. Default header is Content-Type: "application/edn"

Enums

Action

Action to perform in Crux. Receives a serialized Edn First field of your edn should be crux__db___id: CruxId Allowed actions: