Skip to main content

Trigger

A project-specific mapping between an event-type (provided by a connection) and an entry-point function (implemented in a specific file in the project's code).

Formal Definition

Let AutoKitteh have a configured project (P)(P), and:

  • PP has a configured connection (Cp)(C_p)
    • CpC_p provides a certain event-type (Ec)(E_c)
  • PP implements a certain function (Fp)(F_p) in its code
  • PP has a configured trigger (Tef)(T_{ef}) between EcE_c and FpF_p
  • PP has an active deployment (Dp)(D_p)

Whenever CpC_p receives an instance of EcE_c, the AutoKitteh server will:

  • Dispatch EcE_c to DpD_p
    • Start a runtime session (Sdef)(S_{def}) that executes FpF_p
note

Connections may be reused by multiple projects, and event-types may be significant to multiple projects. In other words, any event may be a trigger for multiple entry-point functions.

Therefore, the AutoKitteh dispatcher supports a "fan-out" behavior, to distribute each event to multiple consumers simultaneously, if needed.

Configuration Details

FieldTypeDescription
connectionStringConnection name
event_typeStringProvided by the integration that
the connection is an instance of
entrypointStringFormat: file_name:function_name

YAML Manifest Examples

triggers:
- connection: my_github_connection
event_type: pull_request
entrypoint: program.star:on_github_pull_request
- connection: my_http_connection
event_type: get
entrypoint: program.star:on_http_get