Documentation ¶
Index ¶
- Variables
- type Component
- type ComponentView
- type ConfigOption
- type ConfigOptions
- type ControlCommand
- type FileType
- type GenerateConfigRequest
- type Metadata
- type MetadataView
- type Pipeline
- type PipelineView
- type Plugin
- type PluginOpenRequest
- type PluginView
- type Processor
- type ProcessorView
- type Result
- type Server
- type VisualizeFormat
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultSchedule = "" DefaultCircuitBreakerSamples int64 = 10 DefaultCircuitBreakerRate float64 = 0.9 DefaultBootstrap = false DefaultConfigOptions = ConfigOptions{ Schedule: DefaultSchedule, CircuitBreakerSamples: DefaultCircuitBreakerSamples, CircuitBreakerRate: DefaultCircuitBreakerRate, Bootstrap: DefaultBootstrap, } )
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component interface { List() ([]ComponentView, error) Find(name string) (*ComponentView, error) }
type ComponentView ¶
type ComponentView struct { Name string `json:"name"` RawConfig string `json:"raw_config,omitempty"` SampleConfig string `json:"sample_config"` Description string `json:"description"` InjectName string `json:"inject_name,omitempty"` ReflectType string `json:"reflect_type,omitempty"` ReflectValue string `json:"reflect_value,omitempty"` }
type ConfigOption ¶ added in v1.0.5
type ConfigOption func(*ConfigOptions)
func WithBootstrap ¶ added in v1.0.5
func WithBootstrap(b bool) ConfigOption
func WithCircuitBreakerRate ¶ added in v1.0.5
func WithCircuitBreakerRate(f float64) ConfigOption
func WithCircuitBreakerSamples ¶ added in v1.0.5
func WithCircuitBreakerSamples(s int64) ConfigOption
func WithComponents ¶ added in v1.0.5
func WithComponents(cs []string) ConfigOption
func WithProcessor ¶ added in v1.0.5
func WithProcessor(ps []string) ConfigOption
func WithSchedule ¶ added in v1.0.5
func WithSchedule(schedule string) ConfigOption
type ConfigOptions ¶ added in v1.0.5
type ConfigOptions struct { Schedule string `json:"schedule"` CircuitBreakerSamples int64 `json:"circuit_breaker_samples"` CircuitBreakerRate float64 `json:"circuit_breaker_rate"` Bootstrap bool `json:"bootstrap"` Components []string `json:"components"` Processors []string `json:"processors"` }
func NewConfigOptions ¶ added in v1.0.5
func NewConfigOptions(opts ...ConfigOption) ConfigOptions
type ControlCommand ¶
type ControlCommand string
const ( ControlCommandStart ControlCommand = "start" ControlCommandStop ControlCommand = "stop" ControlCommandRestart ControlCommand = "restart" )
type GenerateConfigRequest ¶ added in v1.0.5
type GenerateConfigRequest struct { Name string `json:"name"` Schedule string `json:"schedule"` CircuitBreakerSamples int64 `json:"circuit_breaker_samples"` CircuitBreakerRate float64 `json:"circuit_breaker_rate"` Bootstrap bool `json:"bootstrap"` Components []string `json:"components"` Processors []string `json:"processors"` }
type MetadataView ¶
type MetadataView struct { PluginPaths []string `json:"plugin_paths" yaml:"plugin_paths"` PipelineConfigPaths []string `json:"pipeline_config_paths" yaml:"pipeline_config_paths"` HTTPAddr string `json:"http_addr" yaml:"http_addr"` Version string `json:"version" yaml:"version"` Branch string `json:"branch" yaml:"branch"` Commit string `json:"commit" yaml:"commit"` Built string `json:"built" yaml:"built"` }
type Pipeline ¶
type Pipeline interface { GenerateConfig(name string, opts ...ConfigOption) (*pipe.Config, error) Add(conf pipe.Config) error Remove(names ...string) error Recreate(conf pipe.Config) error List() ([]PipelineView, error) Find(name string) (*PipelineView, error) Control(cmd ControlCommand, names []string) error Visualize(name string, format VisualizeFormat) ([]byte, error) }
type PipelineView ¶
type PipelineView struct { Name string `json:"name"` State string `json:"state"` Schedule string `json:"schedule"` Bootstrap bool `json:"bootstrap"` StartTime string `json:"start_time"` ExitTime string `json:"exit_time"` RunTimes string `json:"run_times"` NextRunTime string `json:"next_run_time"` LastStartTime string `json:"last_start_time"` LastEndTime string `json:"last_end_time"` Components []ComponentView `json:"components"` Processors []ProcessorView `json:"processors"` RawConfig []byte `json:"raw_config"` Error string `json:"error"` StreamError string `json:"stream_error"` StreamErrorCount int `json:"stream_error_count"` }
type PluginOpenRequest ¶
type PluginOpenRequest struct {
Path string `json:"path"`
}
type PluginView ¶
type Processor ¶
type Processor interface { List() ([]ProcessorView, error) Find(name string) (*ProcessorView, error) }
type ProcessorView ¶
type Server ¶
type Server interface {
Metadata() (MetadataView, error)
}
type VisualizeFormat ¶
type VisualizeFormat string
const ( VisualizeFormatSVG VisualizeFormat = "svg" VisualizeFormatPng VisualizeFormat = "png" VisualizeFormatDot VisualizeFormat = "dot" VisualizeFormatTerm VisualizeFormat = "term" )
Click to show internal directories.
Click to hide internal directories.