[][src]Module transistor::docker

Docker Client module. It contains the DockerClient for Docker.

DockerClient 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 requests 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.
  • entity_tx requests endpoint /entity-tx via POST. A serialized CruxId, serialized Edn::Key or a String containing a keyword must be passed as argument.
  • document_by_id requests endpoint /document/{:content-hash} via GET. {:content-hash} can be obtained with function entity_tx.
  • documents requests endpoint /documents via POST. The argument of this reuqest is a vector of content-hashes that converts to an edn set as a body.
  • query requests endpoint /query via POST. Argument is a query of the type Query. Retrives a Set containing a vector of the values defined by the function Query::find.

Enum Action is available in this module.

Examples can be found in the examples directory.

Structs

DockerClient

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

Enums

Action

Action to perform in Crux. Receives a serialized Edn.