Documentation
¶
Index ¶
- Variables
- func CheckErrorValues(refvs []reflect.Value) (err error)
- 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 ( // Logger app logger Logger = logutil.DefaultLogger )
Functions ¶
func CheckErrorValues ¶
func CleanComments ¶
CleanComments used for remove non-standard json comments. Supported comment formats format 1: ^\s*# format 2: ^\s*//
func ReflectConfig ¶
Reflect config.
func RegistFilterHandler ¶
func RegistFilterHandler(name string, handler FilterHandler)
Registe FilterHandler.
func RegistInputHandler ¶
func RegistInputHandler(name string, handler InputHandler)
Registe InputHandler.
func RegistOutputHandler ¶
func RegistOutputHandler(name string, handler OutputHandler)
Registe OutputHandler.
Types ¶
type CommonConfig ¶
Common config for logcool.
func (*CommonConfig) Invoke ¶
func (t *CommonConfig) Invoke(f interface{}) (refvs []reflect.Value, err error)
Invoke all reflect-values.
func (*CommonConfig) SetInjector ¶
func (t *CommonConfig) SetInjector(inj inject.Injector)
Set injector value.
type Config ¶
type Config struct {
inject.Injector `json:"-"`
InputRaw []ConfigRaw `json:"input,omitempty"`
FilterRaw []ConfigRaw `json:"filter,omitempty"`
OutputRaw []ConfigRaw `json:"output,omitempty"`
}
config struct for config-raw.
func LoadDefaultConfig ¶
Laod default-config from string.
func LoadFromData ¶
Load config from data([]byte).
func LoadFromFile ¶
Load config from file.
func LoadFromString ¶
Laod config from string.
func (*Config) InvokeSimple ¶
Simple-invoke.
type TypeConfig ¶
type TypeConfig interface {
SetInjector(inj inject.Injector)
GetType() string
Invoke(f interface{}) (refvs []reflect.Value, err error)
}
Config struct for the logcool.
type TypeFilterConfig ¶
type TypeFilterConfig interface {
TypeConfig
Event(logevent.LogEvent) logevent.LogEvent
}
Filter base type interface.
type TypeInputConfig ¶
type TypeInputConfig interface {
TypeConfig
Start()
}
Input base type interface.
type TypeOutputConfig ¶
type TypeOutputConfig interface {
TypeConfig
Event(event logevent.LogEvent) (err error)
}
Output base type interface.
Click to show internal directories.
Click to hide internal directories.