controller

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	ScratchDir string
	Workers    int
}

Configuration encapsulates information used by the control loop.

func DefaultConfigWithFlags

func DefaultConfigWithFlags() (*Configuration, []cli.Flag)

DefaultConfigWithFlags returns configuration and flags specific to the control loop.

func (*Configuration) Validate

func (c *Configuration) Validate() error

Validate ensures the configuration provided contains the required information.

type Controller

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

Controller encapsulates the logic of spinning up multiple workers to feed from a common integration

func New

func New(
	cfg *Configuration,
	integration integrations.Runner,
	consumer *run.Consumer,
) (*Controller, error)

New returns a new controller that manages the pipeline between the integration and the consumers

func (*Controller) Run

func (c *Controller) Run(parent context.Context) error

Run performs a single pass over the data.

Jump to

Keyboard shortcuts

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