Documentation ¶
Index ¶
- Variables
- func CleanComments(data []byte) (out []byte, err error)
- func ReflectConfig(confraw *ConfigRaw, conf interface{}) (err error)
- func RegistFilterHandler(name string, handler FilterHandler)
- func RegistInputHandler(name string, handler InputHandler)
- func RegistOutputHandler(name string, handler OutputHandler)
- type CommonConfig
- type Config
- type ConfigRaw
- type FilterConfig
- type FilterHandler
- type InChan
- type InputConfig
- type InputHandler
- type OutChan
- type OutputConfig
- type OutputHandler
- type TypeConfig
- type TypeFilterConfig
- type TypeInputConfig
- type TypeOutputConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorReadConfigFile1 = errutil.NewFactory("Failed to read config file: %q") ErrorUnmarshalConfig = errutil.NewFactory("Failed unmarshalling config json") )
errors
View Source
var ( ErrorUnknownFilterType = errutil.NewFactory("unknown filter config type: %q") ErrorInitFilter = errutil.NewFactory("filter initialization failed: %q") )
errors
View Source
var ( ErrorUnknownInputType1 = errutil.NewFactory("unknown input config type: %q") ErrorRunInput1 = errutil.NewFactory("run input module failed: %q") )
errors
View Source
var ( ErrorUnknownOutputType1 = errutil.NewFactory("unknown output config type: %q") ErrorRunOutput1 = errutil.NewFactory("run output module failed: %q") )
errors
View Source
var ( // Logger app logger Logger = logutil.DefaultLogger )
Functions ¶
func CleanComments ¶
CleanComments used for remove non-standard json comments. Supported comment formats format 1: ^\s*# format 2: ^\s*//
func ReflectConfig ¶
func RegistFilterHandler ¶
func RegistFilterHandler(name string, handler FilterHandler)
func RegistInputHandler ¶
func RegistInputHandler(name string, handler InputHandler)
func RegistOutputHandler ¶
func RegistOutputHandler(name string, handler OutputHandler)
Types ¶
type CommonConfig ¶
func (*CommonConfig) GetType ¶
func (t *CommonConfig) GetType() string
func (*CommonConfig) Invoke ¶
func (t *CommonConfig) Invoke(f interface{}) (refvs []reflect.Value, err error)
func (*CommonConfig) SetInjector ¶
func (t *CommonConfig) SetInjector(inj inject.Injector)
type Config ¶
type Config struct { inject.Injector `json:"-"` InputRaw []ConfigRaw `json:"input,omitempty"` FilterRaw []ConfigRaw `json:"filter,omitempty"` OutputRaw []ConfigRaw `json:"output,omitempty"` }
func LoadFromData ¶
func LoadFromFile ¶
func LoadFromString ¶
func (*Config) InvokeSimple ¶
func (*Config) RunFilters ¶
func (*Config) RunOutputs ¶
type FilterConfig ¶
type FilterConfig struct {
CommonConfig
}
type FilterHandler ¶
type FilterHandler interface{}
type InputConfig ¶
type InputConfig struct {
CommonConfig
}
type InputHandler ¶
type InputHandler interface{}
type OutputConfig ¶
type OutputConfig struct {
CommonConfig
}
type OutputHandler ¶
type OutputHandler interface{}
type TypeConfig ¶
type TypeFilterConfig ¶
type TypeFilterConfig interface { TypeConfig Event(logevent.LogEvent) logevent.LogEvent }
type TypeInputConfig ¶
type TypeInputConfig interface { TypeConfig Start() }
type TypeOutputConfig ¶
type TypeOutputConfig interface { TypeConfig Event(event logevent.LogEvent) (err error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.