fileoutput

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check added in v0.8.0

func Check(v *Config, workers map[eosc.RequireId]eosc.IWorker) error

func Create added in v0.9.0

func Create(id, name string, cfg *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

func NewFactory

func NewFactory() eosc.IExtenderDriverFactory

func Register

func Register(register eosc.IExtenderDriverRegister)

Register 注册file_output驱动工厂

Types

type Config

type Config struct {
	Scopes        []string             `json:"scopes" label:"作用域"`
	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:"单位:天" default:"7" minimum:"1"`
	Type          string               `json:"type" yaml:"type" enum:"json,line" label:"输出格式"`
	ContentResize []ContentResize      `json:"content_resize" yaml:"content_resize" label:"内容截断配置" switch:"type===json"`
	Formatter     eosc.FormatterConfig `json:"formatter" yaml:"formatter" label:"格式化配置"`
}

type ContentResize added in v0.15.1

type ContentResize struct {
	Size   int    `json:"size" label:"内容截断大小" description:"单位:M" default:"10" minimum:"0"`
	Suffix string `json:"suffix" label:"匹配标签后缀"`
}

type FileOutput

type FileOutput struct {
	drivers.WorkerBase
	// contains filtered or unexported fields
}

func (*FileOutput) CheckSkill

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

func (*FileOutput) Output

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

func (*FileOutput) Reset

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

func (*FileOutput) ServeHTTP added in v0.13.2

func (a *FileOutput) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*FileOutput) Start

func (a *FileOutput) Start() error

func (*FileOutput) Stop

func (a *FileOutput) Stop() error

type FileWriter added in v0.8.0

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

Jump to

Keyboard shortcuts

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