fileoutput

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: 6 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 {
	File      string               `json:"file" yaml:"file" label:"文件名称"`
	Dir       string               `json:"dir" yaml:"dir" label:"文件存放目录"`
	Period    string               `json:"period" yaml:"period" enum:"hour,day" label:"日志分割周期"`
	Expire    int                  `json:"expire" yaml:"expire" label:"日志保存时间" description:"单位:天"`
	Type      string               `json:"type" yaml:"type" enum:"json,line" label:"输出格式"`
	Formatter eosc.FormatterConfig `json:"formatter" yaml:"formatter" label:"格式化配置"`
}

type Driver

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

func (*Driver) Check

func (d *Driver) Check(v interface{}) (*Config, error)

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 FileOutput

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

func (*FileOutput) CheckSkill

func (a *FileOutput) CheckSkill(skill string) bool

func (*FileOutput) Id

func (a *FileOutput) Id() string

func (*FileOutput) Output

func (a *FileOutput) Output(entry eosc.IEntry) error

func (*FileOutput) Reset

func (a *FileOutput) Reset(conf interface{}, workers map[eosc.RequireId]interface{}) (err error)

func (*FileOutput) Start

func (a *FileOutput) Start() error

func (*FileOutput) Stop

func (a *FileOutput) Stop() error

Jump to

Keyboard shortcuts

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