reg

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: GPL-3.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

View Source
const (
	MultiplexForkName = "multiplex"
)

Variables

This section is empty.

Functions

func BoolParam

func BoolParam(params map[string]string, name string, defaultVal bool, hasDefault bool, err *error) bool

func DurationParam

func DurationParam(params map[string]string, name string, defaultVal time.Duration, hasDefault bool, err *error) time.Duration

func FloatParam

func FloatParam(params map[string]string, name string, defaultVal float64, hasDefault bool, err *error) float64

func IntParam

func IntParam(params map[string]string, name string, defaultVal int, hasDefault bool, err *error) int

func ParameterError

func ParameterError(name string, err error) error

func RegisterMultiplexFork

func RegisterMultiplexFork(builder ProcessorRegistry)

default Fork

func StrParam

func StrParam(params map[string]string, name string, defaultVal string, hasDefault bool, err *error) string

Types

type AnalysisFunc

type AnalysisFunc func(pipeline *bitflow.SamplePipeline, params map[string]string) error

type AvailableProcessor

type AvailableProcessor struct {
	Name           string
	IsFork         bool
	Description    string
	RequiredParams []string
	OptionalParams []string
}

type AvailableProcessorSlice

type AvailableProcessorSlice []AvailableProcessor

func (AvailableProcessorSlice) Len

func (slice AvailableProcessorSlice) Len() int

func (AvailableProcessorSlice) Less

func (slice AvailableProcessorSlice) Less(i, j int) bool

func (AvailableProcessorSlice) Swap

func (slice AvailableProcessorSlice) Swap(i, j int)

type BatchStepFunc added in v0.0.28

type BatchStepFunc func(params map[string]string) (bitflow.BatchProcessingStep, error)

type ForkFunc

type ForkFunc func(subpiplines []Subpipeline, params map[string]string) (fork.Distributor, error)

type JsonProcessingStep

type JsonProcessingStep struct {
	Name           string
	IsFork         bool
	IsBatch        bool
	Description    string
	RequiredParams []string
	OptionalParams []string
	VariableParams bool
}

type ParameterOption added in v0.0.28

type ParameterOption func(*RegisteredParameters)

func OptionalParams

func OptionalParams(params ...string) ParameterOption

func RequiredParams

func RequiredParams(params ...string) ParameterOption

func VariableParams added in v0.0.28

func VariableParams() ParameterOption

type ProcessingSteps

type ProcessingSteps []JsonProcessingStep

func (ProcessingSteps) Len

func (slice ProcessingSteps) Len() int

func (ProcessingSteps) Less

func (slice ProcessingSteps) Less(i, j int) bool

func (ProcessingSteps) Swap

func (slice ProcessingSteps) Swap(i, j int)

type ProcessorRegistry

type ProcessorRegistry struct {
	*ProcessorRegistryImpl
}

Avoid having to specify a pointer to a ProcessorRegistry at many locations.

func NewProcessorRegistry

func NewProcessorRegistry() ProcessorRegistry

func (ProcessorRegistry) FormatCapabilities added in v0.0.28

func (r ProcessorRegistry) FormatCapabilities(out io.Writer) error

func (ProcessorRegistry) FormatJsonCapabilities added in v0.0.28

func (r ProcessorRegistry) FormatJsonCapabilities(out io.Writer) error

type ProcessorRegistryImpl

type ProcessorRegistryImpl struct {
	Endpoints bitflow.EndpointFactory
	// contains filtered or unexported fields
}

func (ProcessorRegistryImpl) GetAvailableProcessors

func (r ProcessorRegistryImpl) GetAvailableProcessors() AvailableProcessorSlice

func (*ProcessorRegistryImpl) GetBatchStep added in v0.0.28

func (r *ProcessorRegistryImpl) GetBatchStep(name string) (batchStep RegisteredBatchStep, ok bool)

func (*ProcessorRegistryImpl) GetFork

func (r *ProcessorRegistryImpl) GetFork(name string) (fork RegisteredFork, ok bool)

func (*ProcessorRegistryImpl) GetStep added in v0.0.28

func (r *ProcessorRegistryImpl) GetStep(name string) (analysisProcessor RegisteredPipelineStep, ok bool)

func (*ProcessorRegistryImpl) RegisterBatchStep added in v0.0.28

func (r *ProcessorRegistryImpl) RegisterBatchStep(name string, createBatchStep BatchStepFunc, description string, options ...ParameterOption)

func (*ProcessorRegistryImpl) RegisterFork

func (r *ProcessorRegistryImpl) RegisterFork(name string, createFork ForkFunc, description string, options ...ParameterOption)

func (*ProcessorRegistryImpl) RegisterStep added in v0.0.28

func (r *ProcessorRegistryImpl) RegisterStep(name string, setupPipeline AnalysisFunc, description string, options ...ParameterOption)

type RegisteredBatchStep added in v0.0.28

type RegisteredBatchStep struct {
	RegisteredStep
	Func BatchStepFunc
}

type RegisteredFork

type RegisteredFork struct {
	RegisteredStep
	Func ForkFunc
}

type RegisteredParameters added in v0.0.28

type RegisteredParameters struct {
	Required []string
	Optional []string
}

func (RegisteredParameters) AcceptsVariableParameters added in v0.0.28

func (params RegisteredParameters) AcceptsVariableParameters() bool

func (RegisteredParameters) Verify added in v0.0.28

func (params RegisteredParameters) Verify(input map[string]string) error

type RegisteredPipelineStep added in v0.0.28

type RegisteredPipelineStep struct {
	RegisteredStep
	Func AnalysisFunc
}

type RegisteredStep added in v0.0.28

type RegisteredStep struct {
	Name        string
	Description string
	Params      RegisteredParameters
}

type Subpipeline

type Subpipeline interface {
	Build() (*bitflow.SamplePipeline, error)
	Keys() []string
}

Jump to

Keyboard shortcuts

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