flow

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package flow is a middleman between sources and destinations. A flow is a collection of destinations' actions, and can be executed by sources' triggers.

Transformation from triggers to actions shall happen here.

This is useful because it allows to: - Enable or disable flows whenever we want; - Share flows between multiple triggers; - Share data structures between triggers and actions; - Add business logic specific to a flow without impacting the triggers and actions.

Index

Constants

This section is empty.

Variables

View Source
var Defaults = &Options{
	Context: context.Background(),
	Enabled: false,
}

Defaults are the defaults options set for a flow. When not set, these values will automatically be applied.

Functions

This section is empty.

Types

type Flow

type Flow interface {

	// Options returns the options originally passed to the Options struct.
	Options() *Options

	// Transform returns a slice of actions to run, grouped by their destination
	// name. It is in charge of the "T" in the ETL process: it is used to Transform
	// data from triggers to actions.
	Transform(*Toolkit) destination.Actions
}

Flow is a middleman allowing triggers to run actions.

A new flow can be generated using the Blacksmith CLI:

$ blacksmith generate flow --name <name> [--path <path>]

type Options

type Options struct {

	// Context is a free key-value dictionary that will be passed to the flow.
	Context context.Context `json:"-"`

	// Enabled lets the user enable or disable a flow.
	Enabled bool `json:"enabled"`
}

Options is the options a user can pass to use a flow.

type Toolkit

type Toolkit struct {

	// Logger gives access to the logrus Logger passed in options when creating the
	// Blacksmith application.
	Logger *logrus.Logger
}

Toolkit contains a suite of utilities and data to help the user successfully run the flow.

Directories

Path Synopsis
Package destination provides the development kit for working with third-party services that will receive events from Blacksmith.
Package destination provides the development kit for working with third-party services that will receive events from Blacksmith.
Package source provides the development kit for working with Blacksmith SDKs, cloud services, databases, or any kind of application able to send data or push notifications.
Package source provides the development kit for working with Blacksmith SDKs, cloud services, databases, or any kind of application able to send data or push notifications.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL