executor

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, factory Factory) error

Types

type Component

type Component struct {
	Name      string
	RawConfig string
	Component component.Component
	Factory   component.Factory
}

type Executor

type Executor interface {
	Name() string
	Config() string
	Start() error
	Stop()
	State() State
	ListComponents() []Component
	ListProcessors() []Processor
	Error() error
}

type Factory

type Factory interface {
	// 组件示例配置
	SampleConfig() string

	// 组件描述
	Description() string

	// 创建实例
	New(config string) (Executor, error)
}

func GetFactory

func GetFactory(name string) (Factory, error)

type FactoryFunc

type FactoryFunc func(config string) (Executor, error)

type NamedFactory

type NamedFactory struct {
	Name    string
	Factory Factory
}

func ListFactory

func ListFactory() []NamedFactory

type Processor

type Processor struct {
	Name      string
	RawConfig string
	Processor processor.Processor
	Factory   processor.Factory
}

type State

type State int32
var (
	Idle    State = 0
	Running State = 1
	Exited  State = 3
)

func (State) String

func (s State) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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