Documentation ¶
Index ¶
- Variables
- func AddSubscriptionTarget(msg proto.Message, meta Meta, addTarget string, tpl *template.Template) error
- func DecodeConfig(src, dst interface{}) error
- func Register(name string, initFn Initializer)
- type Initializer
- type Meta
- type Option
- func WithClusterName(name string) Option
- func WithEventProcessors(eps map[string]map[string]interface{}, log *log.Logger, ...) Option
- func WithLogger(logger *log.Logger) Option
- func WithName(name string) Option
- func WithRegister(reg *prometheus.Registry) Option
- func WithTargetsConfig(tcs map[string]*types.TargetConfig) Option
- type Output
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultTargetTemplate = template.Must( template.New("target-template"). Funcs(TemplateFuncs). Parse(defaultTargetTemplateString)) )
View Source
var OutputTypes = []string{
"file",
"influxdb",
"kafka",
"nats",
"prometheus",
"stan",
"tcp",
"udp",
"gnmi",
}
View Source
var Outputs = map[string]Initializer{}
View Source
var TemplateFuncs = template.FuncMap{ "host": utils.GetHost, }
Functions ¶
func AddSubscriptionTarget ¶ added in v0.15.0
func DecodeConfig ¶ added in v0.4.0
func DecodeConfig(src, dst interface{}) error
func Register ¶
func Register(name string, initFn Initializer)
Types ¶
type Initializer ¶
type Initializer func() Output
type Option ¶ added in v0.5.2
type Option func(Output)
func WithClusterName ¶ added in v0.8.0
func WithEventProcessors ¶ added in v0.6.0
func WithLogger ¶ added in v0.5.2
func WithRegister ¶ added in v0.7.0
func WithRegister(reg *prometheus.Registry) Option
func WithTargetsConfig ¶ added in v0.18.0
func WithTargetsConfig(tcs map[string]*types.TargetConfig) Option
type Output ¶
type Output interface { Init(context.Context, string, map[string]interface{}, ...Option) error Write(context.Context, proto.Message, Meta) WriteEvent(context.Context, *formatters.EventMsg) Close() error RegisterMetrics(*prometheus.Registry) String() string SetLogger(*log.Logger) SetEventProcessors(map[string]map[string]interface{}, *log.Logger, map[string]*types.TargetConfig) SetName(string) SetClusterName(string) SetTargetsConfig(map[string]*types.TargetConfig) }
Click to show internal directories.
Click to hide internal directories.