Bootstrap File

A boostrap file is written in YAML syntax and it should adhere this schema.

It consists out of 5 sections:

  1. protocols section:

This section contains the protocols to initialize.Both protocol instances for input and output modules should be initialized in this section.It’s not necessary to use all the initialized instances. This section is optional.

A sample extract:

protocols:
    json_encode:
        protocol: wishbone.protocol.encode.json
        arguments:
            sort_keys: true
    msgpack_decode:
        protocol: wishbone.protocol.decode.msgpack
  • The protocol value is the entrypoint value.
  • arguments is optional.
  1. module_functions section:

This section initializes the module functions. It is not necessary to use all the initialized functions.This section is optional.

A sample extract:

module_functions:
  tagit:
      function: wishbone.function.module.append
      arguments:
          data: you_are_tagged
          destination: tags
  • The function value is the entrypoint name.
  • arguments is optional
  1. template_functions section:

This section initializes the template functions. It is not necessary to use all the initialized functions.This section is optional.

A sample extract:

template_functions:
  gimmeNumber:
    function: wishbone.function.template.choice
    arguments:
      array:
        - one
        - two
        - three
  • The function value is the entrypoint name.
  • arguments is optional
  1. modules section:

This section initializes modules.It is not necessary to connect a module to another module in the routingtable section. Otherwise this section is mandatory.

A sample extract:

modules:
  input:
    module: wishbone.module.input.generator
    arguments:
      interval: 1
      payload: hello

  output:
    module: wishbone.module.output.stdout
    arguments:
      prefix: '{{ data }} is the prefix '
      selection: '.'
  • The module value is the entrypoint name.
  • arguments is optional.
  1. routingtable section:

The routing table section defines all the connections between the module queues therefor defining the event flow and order the events are passing through modules.

The entries should have following format:

source_module_instance_name.queue_name -> destination_module_instance_name.queue_name

A sample extract:

routingtable:
  - input.outbox            -> jsondecode.inbox
  - jsondecode.outbox       -> match.inbox
  - match.email             -> email.inbox
  - match.pagerduty         -> pagerduty.inbox
  - match.mattermost        -> mattermost.inbox
  - match.jira              -> jira.inbox
  - match.msteams           -> msteams.inbox
  • The routing table is obligatory
  • The routing table contains ‘->’ indicating the relation between the source queue and the destination queue.

A complete example can be seen in the examples section.