Documentation ¶
Index ¶
- Constants
- Variables
- func AfterErrorFunc(errorMsg string)
- func GetFieldsByRef(fieldsRef []string, fields map[string]interface{}) map[string]interface{}
- func InjectFields(labels map[string]string, fields map[string]interface{})
- func PublishOrDrop(topic string, data interface{})
- func Registry(listenerName string, listenerFactory ListenerFactory, opts ...SubscribeOpt)
- func RegistrySubscribe(subscribe *Subscribe)
- func RegistrySubscribeTemporary(subscribe *Subscribe)
- func StartAndRun(config Config)
- func UnRegistrySubscribeTemporary(subscribe *Subscribe)
- type BaseInterceptorMetric
- type BaseMetric
- type BaseMetricData
- type CollectMetricData
- type ComponentBaseConfig
- type ComponentBaseMetricData
- type ComponentEventType
- type Config
- type ErrorMetricData
- type Event
- type EventCenter
- type FileInfo
- type Listener
- type ListenerFactory
- type LogAlertData
- type NormalizeMetricData
- type NormalizeMetricEvent
- type PipelineMetricData
- type QueueMetricData
- type ReloadMetricData
- type SinkMetricData
- type Subscribe
- type SubscribeOpt
- type WatchMetricData
Constants ¶
View Source
const ( ComponentStop = ComponentEventType("stop") ComponentStart = ComponentEventType("start") )
Variables ¶
View Source
var ( FileSourceMetricTopic = "filesource" FileWatcherTopic = "filewatcher" SinkMetricTopic = "sink" ReloadTopic = "reload" ErrorTopic = "error" LogAlertTopic = "log" QueueMetricTopic = "queue" PipelineTopic = "pipeline" ComponentBaseTopic = "component" SystemTopic = "sys" NormalizeTopic = "normalize" NoDataTopic = "noDataAlert" InfoTopic = "info" )
Functions ¶
func AfterErrorFunc ¶
func AfterErrorFunc(errorMsg string)
func GetFieldsByRef ¶
func InjectFields ¶
func PublishOrDrop ¶
func PublishOrDrop(topic string, data interface{})
func Registry ¶
func Registry(listenerName string, listenerFactory ListenerFactory, opts ...SubscribeOpt)
func RegistrySubscribe ¶
func RegistrySubscribe(subscribe *Subscribe)
func RegistrySubscribeTemporary ¶ added in v1.4.0
func RegistrySubscribeTemporary(subscribe *Subscribe)
func StartAndRun ¶
func StartAndRun(config Config)
func UnRegistrySubscribeTemporary ¶ added in v1.4.0
func UnRegistrySubscribeTemporary(subscribe *Subscribe)
Types ¶
type BaseInterceptorMetric ¶ added in v1.3.0
type BaseMetric ¶
type BaseMetricData ¶
type CollectMetricData ¶
type ComponentBaseConfig ¶
func (ComponentBaseConfig) Code ¶
func (cbc ComponentBaseConfig) Code() string
type ComponentBaseMetricData ¶
type ComponentBaseMetricData struct { EventType ComponentEventType // "start","stop"... PipelineName string EpochTime time.Time Config ComponentBaseConfig }
type ComponentEventType ¶
type ComponentEventType string
type ErrorMetricData ¶
type ErrorMetricData struct {
ErrorMsg string
}
type EventCenter ¶
type EventCenter struct {
// contains filtered or unexported fields
}
func NewEventCenter ¶
func NewEventCenter(bufferSize int64, asyncConsumerSize int) *EventCenter
func (*EventCenter) Stop ¶
func (ec *EventCenter) Stop()
type ListenerFactory ¶
type ListenerFactory func() Listener
type LogAlertData ¶
func NewLogAlertData ¶
func NewLogAlertData(labels map[string]string, annotations map[string]string) *LogAlertData
func (*LogAlertData) Fingerprint ¶
func (lad *LogAlertData) Fingerprint() string
type NormalizeMetricData ¶ added in v1.3.0
type NormalizeMetricData struct { BaseInterceptorMetric Count uint64 Name string }
type NormalizeMetricEvent ¶ added in v1.3.0
type NormalizeMetricEvent struct { MetricMap map[string]*NormalizeMetricData PipelineName string Name string IsClear bool }
type PipelineMetricData ¶
type PipelineMetricData struct { EventType ComponentEventType Name string Time time.Time ComponentConfigs []ComponentBaseConfig }
type QueueMetricData ¶
type ReloadMetricData ¶
type ReloadMetricData struct {
Tick int
}
type SinkMetricData ¶
type SinkMetricData struct { BaseMetric SuccessEventCount int FailEventCount int GoroutinePoolSize int }
type Subscribe ¶
type Subscribe struct {
// contains filtered or unexported fields
}
func NewSubscribe ¶
func NewSubscribe(listenerName string, factory ListenerFactory, opts ...SubscribeOpt) *Subscribe
func RegistryTemporary ¶ added in v1.4.0
func RegistryTemporary(listenerName string, listenerFactory ListenerFactory, opts ...SubscribeOpt) *Subscribe
type SubscribeOpt ¶
type SubscribeOpt func(s *Subscribe)
func WithAsync ¶
func WithAsync(async bool) SubscribeOpt
func WithTopic ¶
func WithTopic(topic string) SubscribeOpt
func WithTopics ¶
func WithTopics(topics []string) SubscribeOpt
type WatchMetricData ¶
Click to show internal directories.
Click to hide internal directories.