Astarte.Flow.Blocks.Container (astarte_flow v0.1.0)
This is a producer_consumer block that sends messages to a Docker container.
Messages are sent and received via AMQP.
The block will manage the creation of the Container in a Kubernetes cluster using the Astarte Kubernetes Operator.
Link to this section Summary
Link to this section Functions
Link to this function
get_container_block(pid)
Link to this function
start_link(opts)
@spec start_link(options) :: GenServer.on_start() when options: [option], option: {:id, String.t()} | {:image, String.t()} | {:type, :producer | :consumer | :producer_consumer} | {:config, map()} | {:prefetch_count, non_neg_integer()} | {:connection, keyword()} | {:amqp_client, module()}
Starts the Container block.
options
Options
:id(required) - The id of the block, it has to be unique between all container blocks.:image(required) - The tag of the docker image that will be used by the block.:config- The Flow configuration that will be passed to the container.:connection- A keyword list containing the options that will be passed toAMQP.Connection.open/1. Defaults to[].:image_pull_secrets- An array of strings, representing the name of K8s secrets that will be used by the Pod created by the container block. This is needed if your image is pulled from a private container registry.:prefetch_count- The prefetch count of the AMQP channel. Defaults to 100.:amqp_client- A module that implements theAstarte.Flow.Blocks.Container.AMQPClientbehaviour and that will be used to connect to AMQP. Defaults toAstarte.Flow.Blocks.Container.RabbitMQClient