flow

package
v0.0.0-...-09da918 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller executes the selected flow

func NewController

func NewController(flows ...Flow) *Controller

func (*Controller) Active

func (c *Controller) Active() string

FlowNames returns the list of available flows

func (*Controller) FlowNames

func (c *Controller) FlowNames() []string

FlowNames returns the list of available flows

func (*Controller) SelectFlow

func (c *Controller) SelectFlow(ctx context.Context, name string) error

SelectFlow selects the flow to be executed previous flow will be stopped

func (*Controller) SubscribeToErrors

func (c *Controller) SubscribeToErrors() <-chan error

SubscribeToErrors returns the channel to subscribe to errors

type Flow

type Flow interface {
	Start(ctx context.Context) error
	Stop()
	Name() string
}

Flow is the interface for implementation of ligths patterns

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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