syslog

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(register eosc.IExtenderDriverRegister)

Register 注册file_output驱动工厂

Types

type Config

type Config struct {
	// 所使用的网络协议, 如:tcp,udp,unix
	Network string `json:"network" yaml:"network" enum:"tcp,udp,unix" label:"网络协议"`
	Address string `json:"address" yaml:"address" label:"请求地址"`
	Level   string `json:"level" yaml:"level" enum:"error,warn,info,debug,trace" label:"日志等级"`

	Type      string               `json:"type" yaml:"type" enum:"line,json" label:"输出格式"`
	Formatter eosc.FormatterConfig `json:"formatter" yaml:"formatter" label:"格式化配置"`
}

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func (*Driver) ConfigType

func (d *Driver) ConfigType() reflect.Type

func (*Driver) Create

func (d *Driver) Create(id, name string, v interface{}, workers map[eosc.RequireId]interface{}) (eosc.IWorker, error)

type Factory

type Factory struct {
}

func NewFactory

func NewFactory() *Factory

func (*Factory) Create

func (f *Factory) Create(profession string, name string, label string, desc string, params map[string]interface{}) (eosc.IExtenderDriver, error)

func (*Factory) Render added in v0.6.0

func (f *Factory) Render() interface{}

type SysWriter

type SysWriter struct {
	*Driver
	// contains filtered or unexported fields
}

func CreateTransporter

func CreateTransporter(conf *Config) (*SysWriter, error)

CreateTransporter 创建syslog-Transporter

func (*SysWriter) CheckSkill

func (s *SysWriter) CheckSkill(skill string) bool

func (*SysWriter) Id

func (s *SysWriter) Id() string

func (*SysWriter) Output

func (s *SysWriter) Output(entry eosc.IEntry) error

func (*SysWriter) Reset

func (s *SysWriter) Reset(conf interface{}, workers map[eosc.RequireId]interface{}) error

func (*SysWriter) Start

func (s *SysWriter) Start() error

func (*SysWriter) Stop

func (s *SysWriter) Stop() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL