Documentation ¶
Index ¶
- Constants
- func ParameterError(name string, err error) error
- func ParseEndpointFilepath(urlStr string) (*url.URL, error)
- func ParseEndpointUrl(urlStr string) (*url.URL, error)
- func ParseEndpointUrlParams(urlStr string, params RegisteredParameters) (*url.URL, map[string]interface{}, error)
- func ParseQueryParameters(parsedUrl *url.URL) (map[string]string, error)
- func ParseTypedQueryParameters(parsedUrl *url.URL, params RegisteredParameters) (map[string]interface{}, error)
- func RegisterMultiplexFork(builder ProcessorRegistry)
- type AnalysisFunc
- type BatchStepFunc
- type ForkFunc
- type JsonParameter
- type JsonParameters
- type JsonProcessingStep
- type ParameterParser
- type ProcessingSteps
- type ProcessorRegistry
- type ProcessorRegistryImpl
- func (r *ProcessorRegistryImpl) GetBatchStep(name string) *RegisteredBatchStep
- func (r *ProcessorRegistryImpl) GetFork(name string) *RegisteredFork
- func (r *ProcessorRegistryImpl) GetStep(name string) *RegisteredPipelineStep
- func (r *ProcessorRegistryImpl) RegisterBatchStep(name string, createBatchStep BatchStepFunc, description string) *RegisteredStep
- func (r *ProcessorRegistryImpl) RegisterFork(name string, createFork ForkFunc, description string) *RegisteredStep
- func (r *ProcessorRegistryImpl) RegisterStep(name string, setupPipeline AnalysisFunc, description string) *RegisteredStep
- type RegisteredBatchStep
- type RegisteredFork
- type RegisteredParameter
- type RegisteredParameters
- func (params RegisteredParameters) Clone() RegisteredParameters
- func (params RegisteredParameters) Optional(name string, parser ParameterParser, defaultValue interface{}, ...) RegisteredParameters
- func (params RegisteredParameters) Param(name string, parser ParameterParser, defaultValue interface{}, isRequired bool, ...) RegisteredParameters
- func (params RegisteredParameters) ParsePrimitives(stringParams map[string]string) (map[string]interface{}, error)
- func (params RegisteredParameters) Required(name string, parser ParameterParser, description ...string) RegisteredParameters
- func (params RegisteredParameters) ValidateAndSetDefaults(parsedValues map[string]interface{}) error
- type RegisteredPipelineStep
- type RegisteredStep
- func (r *RegisteredStep) Optional(name string, parser ParameterParser, defaultValue interface{}, ...) *RegisteredStep
- func (r *RegisteredStep) Param(name string, parser ParameterParser, defaultValue interface{}, isRequired bool, ...) *RegisteredStep
- func (r *RegisteredStep) Required(name string, parser ParameterParser, description ...string) *RegisteredStep
- type Subpipeline
Constants ¶
View Source
const (
MultiplexForkName = "multiplex"
)
Variables ¶
This section is empty.
Functions ¶
func ParameterError ¶
func ParseEndpointFilepath ¶ added in v0.0.49
Parses URL-fragments containing the path and query parameters of the following forms:
- `relative/path?param1=a¶m2=b`
- `/absolute/path?a=b`
func ParseEndpointUrl ¶ added in v0.0.37
Parses URL fragments that contain the entire URL except for the scheme
func ParseEndpointUrlParams ¶ added in v0.0.37
func ParseQueryParameters ¶ added in v0.0.37
func ParseTypedQueryParameters ¶ added in v0.0.37
func ParseTypedQueryParameters(parsedUrl *url.URL, params RegisteredParameters) (map[string]interface{}, error)
func RegisterMultiplexFork ¶
func RegisterMultiplexFork(builder ProcessorRegistry)
Types ¶
type AnalysisFunc ¶
type AnalysisFunc func(pipeline *bitflow.SamplePipeline, params map[string]interface{}) error
type BatchStepFunc ¶ added in v0.0.28
type BatchStepFunc func(params map[string]interface{}) (bitflow.BatchProcessingStep, error)
type ForkFunc ¶
type ForkFunc func(subpiplines []Subpipeline, params map[string]interface{}) (fork.Distributor, error)
type JsonParameter ¶ added in v0.0.31
type JsonParameters ¶ added in v0.0.49
type JsonParameters []JsonParameter
func (JsonParameters) Len ¶ added in v0.0.49
func (slice JsonParameters) Len() int
func (JsonParameters) Less ¶ added in v0.0.49
func (slice JsonParameters) Less(i, j int) bool
func (JsonParameters) Swap ¶ added in v0.0.49
func (slice JsonParameters) Swap(i, j int)
type JsonProcessingStep ¶
type JsonProcessingStep struct { Name string IsFork bool IsBatch bool Description string Params JsonParameters }
type ParameterParser ¶ added in v0.0.31
type ParameterParser interface { String() string ParsePrimitive(val string) (interface{}, error) ParseList(val []string) (interface{}, error) ParseMap(val map[string]string) (interface{}, error) CorrectType(val interface{}) bool }
func Bool ¶ added in v0.0.31
func Bool() ParameterParser
func Duration ¶ added in v0.0.31
func Duration() ParameterParser
func Float ¶ added in v0.0.31
func Float() ParameterParser
func Int ¶ added in v0.0.31
func Int() ParameterParser
func List ¶ added in v0.0.31
func List(primitive ParameterParser) ParameterParser
func Map ¶ added in v0.0.31
func Map(primitive ParameterParser) ParameterParser
func String ¶ added in v0.0.31
func String() ParameterParser
func Time ¶ added in v0.0.33
func Time() ParameterParser
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) GetBatchStep ¶ added in v0.0.28
func (r *ProcessorRegistryImpl) GetBatchStep(name string) *RegisteredBatchStep
func (*ProcessorRegistryImpl) GetFork ¶
func (r *ProcessorRegistryImpl) GetFork(name string) *RegisteredFork
func (*ProcessorRegistryImpl) GetStep ¶ added in v0.0.28
func (r *ProcessorRegistryImpl) GetStep(name string) *RegisteredPipelineStep
func (*ProcessorRegistryImpl) RegisterBatchStep ¶ added in v0.0.28
func (r *ProcessorRegistryImpl) RegisterBatchStep(name string, createBatchStep BatchStepFunc, description string) *RegisteredStep
func (*ProcessorRegistryImpl) RegisterFork ¶
func (r *ProcessorRegistryImpl) RegisterFork(name string, createFork ForkFunc, description string) *RegisteredStep
func (*ProcessorRegistryImpl) RegisterStep ¶ added in v0.0.28
func (r *ProcessorRegistryImpl) RegisterStep(name string, setupPipeline AnalysisFunc, description string) *RegisteredStep
type RegisteredBatchStep ¶ added in v0.0.28
type RegisteredBatchStep struct { RegisteredStep Func BatchStepFunc }
type RegisteredFork ¶
type RegisteredFork struct { RegisteredStep Func ForkFunc }
type RegisteredParameter ¶ added in v0.0.31
type RegisteredParameter struct { Name string Parser ParameterParser Default interface{} Required bool Description string }
func (*RegisteredParameter) String ¶ added in v0.0.31
func (r *RegisteredParameter) String() string
type RegisteredParameters ¶ added in v0.0.28
type RegisteredParameters map[string]RegisteredParameter
func (RegisteredParameters) Clone ¶ added in v0.0.38
func (params RegisteredParameters) Clone() RegisteredParameters
func (RegisteredParameters) Optional ¶ added in v0.0.28
func (params RegisteredParameters) Optional(name string, parser ParameterParser, defaultValue interface{}, description ...string) RegisteredParameters
func (RegisteredParameters) Param ¶ added in v0.0.31
func (params RegisteredParameters) Param(name string, parser ParameterParser, defaultValue interface{}, isRequired bool, description ...string) RegisteredParameters
func (RegisteredParameters) ParsePrimitives ¶ added in v0.0.31
func (params RegisteredParameters) ParsePrimitives(stringParams map[string]string) (map[string]interface{}, error)
func (RegisteredParameters) Required ¶ added in v0.0.28
func (params RegisteredParameters) Required(name string, parser ParameterParser, description ...string) RegisteredParameters
func (RegisteredParameters) ValidateAndSetDefaults ¶ added in v0.0.31
func (params RegisteredParameters) ValidateAndSetDefaults(parsedValues map[string]interface{}) error
Check if required parameters are defined and fill defaults for optional parameters
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 }
func (*RegisteredStep) Optional ¶ added in v0.0.31
func (r *RegisteredStep) Optional(name string, parser ParameterParser, defaultValue interface{}, description ...string) *RegisteredStep
func (*RegisteredStep) Param ¶ added in v0.0.31
func (r *RegisteredStep) Param(name string, parser ParameterParser, defaultValue interface{}, isRequired bool, description ...string) *RegisteredStep
func (*RegisteredStep) Required ¶ added in v0.0.31
func (r *RegisteredStep) Required(name string, parser ParameterParser, description ...string) *RegisteredStep
type Subpipeline ¶
type Subpipeline interface { Build() (*bitflow.SamplePipeline, error) Keys() []string }
Click to show internal directories.
Click to hide internal directories.