Documentation ¶
Index ¶
- Variables
- func Connect(outputModule, inputModule Module, outputName, inputName string) error
- type BaseModule
- func (m *BaseModule) AttachTo(outputModule Module, outputName, inputName string) error
- func (*BaseModule) Close() error
- func (m *BaseModule) CreateInput(name string)
- func (m *BaseModule) CreateOutput(name string)
- func (m *BaseModule) Input(name string) (*Input, error)
- func (m *BaseModule) MustInput(name string) *Input
- func (m *BaseModule) MustOutput(name string) *Output
- func (m *BaseModule) Name() string
- func (m *BaseModule) Output(name string) (*Output, error)
- func (*BaseModule) Start(_ context.Context)
- type Input
- type Module
- type Output
- type Workflow
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownInput = errors.New("unknown input") ErrUnknownOutput = errors.New("unknown output") )
errors
View Source
var (
ErrUnknownModule = errors.New("unknown module")
)
errors
Functions ¶
Types ¶
type BaseModule ¶ added in v0.0.2
type BaseModule struct { Log zerolog.Logger G workerpool.Group // contains filtered or unexported fields }
func New ¶ added in v0.0.2
func New(name string) BaseModule
func (*BaseModule) AttachTo ¶ added in v0.0.2
func (m *BaseModule) AttachTo(outputModule Module, outputName, inputName string) error
func (*BaseModule) Close ¶ added in v0.0.2
func (*BaseModule) Close() error
func (*BaseModule) CreateInput ¶ added in v0.0.2
func (m *BaseModule) CreateInput(name string)
func (*BaseModule) CreateOutput ¶ added in v0.0.2
func (m *BaseModule) CreateOutput(name string)
func (*BaseModule) MustInput ¶ added in v0.0.3
func (m *BaseModule) MustInput(name string) *Input
func (*BaseModule) MustOutput ¶ added in v0.0.3
func (m *BaseModule) MustOutput(name string) *Output
func (*BaseModule) Name ¶ added in v0.0.2
func (m *BaseModule) Name() string
func (*BaseModule) Output ¶ added in v0.0.2
func (m *BaseModule) Output(name string) (*Output, error)
func (*BaseModule) Start ¶ added in v0.0.2
func (*BaseModule) Start(_ context.Context)
type Module ¶
type Module interface { io.Closer Name() string Start(ctx context.Context) Input(name string) (*Input, error) MustInput(name string) *Input Output(name string) (*Output, error) MustOutput(name string) *Output AttachTo(output Module, outputName, inputName string) error }
Module is the interface which modules have to implement.
type Workflow ¶
type Workflow struct {
// contains filtered or unexported fields
}
Workflow -
func (*Workflow) AddWithName ¶
AddWithName - adds module to workflow with custom name
Click to show internal directories.
Click to hide internal directories.