component

package
v0.0.1-0...-a0864a0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	input.Input
	Resource Resource
}

Input Wraps an Input Plugin Instance

type Manager

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

func NewManager

func NewManager(c config.Components, Logger zap.SugaredLogger) (*Manager, error)

func (*Manager) InputsReceiveChans

func (m *Manager) InputsReceiveChans() []<-chan job.Input

func (*Manager) Registry

func (m *Manager) Registry() Registry

func (*Manager) StartAllInputs

func (m *Manager) StartAllInputs() error

func (*Manager) StartAllOutputs

func (m *Manager) StartAllOutputs() error

func (*Manager) StartAllProcessors

func (m *Manager) StartAllProcessors() error

func (*Manager) StartInput

func (m *Manager) StartInput(name string) error

func (*Manager) StartOutput

func (m *Manager) StartOutput(name string) error

func (*Manager) StartProcessor

func (m *Manager) StartProcessor(name string) error

func (*Manager) StopAllInputs

func (m *Manager) StopAllInputs() error

func (*Manager) StopAllOutputs

func (m *Manager) StopAllOutputs() error

func (*Manager) StopAllProcessors

func (m *Manager) StopAllProcessors() error

func (*Manager) StopInput

func (m *Manager) StopInput(name string) error

func (*Manager) StopOutput

func (m *Manager) StopOutput(name string) error

func (*Manager) StopProcessor

func (m *Manager) StopProcessor(name string) error

type Output

type Output struct {
	output.Output
	Resource Resource
	JobChan  chan job.Job
}

Output Wraps and Input Plugin Instance

type Processor

type Processor interface {
	processor.Processor
}

Processor wraps a processor Plugin Instance

type ProcessorReadOnly

type ProcessorReadOnly struct {
	processor.ReadOnly
	Resource Resource
}

processorReadOnly wraps a readonly processor Plugin Instance and its resource

type ProcessorReadWrite

type ProcessorReadWrite struct {
	processor.ReadWrite
	Resource Resource
}

processorReadWrite wraps a read-write processor Plugin Instance and its resource

type ProcessorReadWriteStream

type ProcessorReadWriteStream struct {
	processor.ReadWriteStream
	Resource Resource
}

processorReadWriteStream wraps a read-write-stream processor Plugin Instance and its resource

type Registry

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

Registry Contains Plugin Instances

func NewRegistry

func NewRegistry() *Registry

NewRegistry Register constructor.

func (*Registry) AllProcessors

func (m *Registry) AllProcessors() map[string]Processor

func (*Registry) Component

func (m *Registry) Component(key string) component.Base

func (*Registry) Input

func (m *Registry) Input(name string) *Input

Input Get wrapper.Input Plugin from the loaded plugins.

func (*Registry) LoadInput

func (m *Registry) LoadInput(name string, config config.Input) error

LoadInput Load wrapper.Input Plugin in the loaded registry, according to the parsed config.

func (*Registry) LoadOutput

func (m *Registry) LoadOutput(name string, config config.Output) error

LoadOutput Load wrapper.Output Plugin in the loaded registry, according to the parsed config.

func (*Registry) LoadProcessor

func (m *Registry) LoadProcessor(name string, config config.Processor) error

LoadProcessor Load wrapper.ProcessReadWrite Plugin in the loaded registry, according to the parsed config.

func (*Registry) Output

func (m *Registry) Output(name string) *Output

Output Get wrapper.Output Plugin from the loaded plugins.

func (*Registry) Processor

func (m *Registry) Processor(key string) Processor

type Resource

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

Resource contains types required to control access to a resource

func NewResource

func NewResource(concurrency int) *Resource

NewResource resource Constructor

func (*Resource) Acquire

func (r *Resource) Acquire(ctx context.Context) error

Acquire resource, will block until resource is acquired or context is canceled

func (*Resource) Release

func (r *Resource) Release()

Release resource

Jump to

Keyboard shortcuts

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