Module station::config[][src]

Expand description

Basic configuration system for Process objects in the station crate.

The Config struct is used to hold RPC and PubSub configurations and can be written/read as YAML. The RPC section is used to configure TCP addresses only, whereas RPC via Unix sockets are automatically determined from a run directory that Process uses. The PubSub configuration, however, contains both UDP and Unix datagram socket configurations, as it’s used to determine the various endpoints a publisher must publish to.

Example configration YAML:

rpc:
  # Process named "pets" with "dogs" and "cats" methods.
  pets.dogs: "127.0.0.1:15003"
  pets.cats: "127.0.0.1:17970"
  class.lecture: "127.0.0.1:16928"
pubsub:
  # Topic named "coffee" with subscriptions in the "mocha", "donuts", and "latte" processes.
  coffee:
    - name: mocha
      config:
        Udp: "127.0.0.1:21840"
    - name: donuts
      config: Unix
    - name: latte
      config:
        Udp: "127.0.0.1:18859"
  # Topic named "turtles" with subscriptions in the "rabbits" and "shell" processes.
  turtles:
    - name: rabbits
      config: Unix
    - name: shell
      config:
        Udp: "127.0.0.1:15069"

Structs

RPC and PubSub configuration.

Errors related to creating station configurations.

Network endpoint configuration for a PubSub topic.

Enums

What socket type to use for PubSub.

Functions

Create the subdirectories expected to exist in the run directory.

Get the unix socket directory for a run directory.