httpoutput

package
v0.17.7 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 9 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, conf *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:"作用域"`
	Method        string               `json:"method" yaml:"method" enum:"GET,POST,PUT" label:"请求方式"`
	Url           string               `json:"url" yaml:"url" format:"uri" label:"请求Url"`
	Headers       map[string]string    `json:"headers" yaml:"headers" label:"请求头部"`
	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 Handler added in v0.8.0

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

func NewHandler added in v0.8.0

func NewHandler(config *Config) (*Handler, error)

func (*Handler) Close added in v0.8.0

func (h *Handler) Close() error

func (*Handler) Output added in v0.8.0

func (h *Handler) Output(entry eosc.IEntry) error

type HttpOutput

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

func (*HttpOutput) CheckSkill

func (h *HttpOutput) CheckSkill(skill string) bool

func (*HttpOutput) Output

func (h *HttpOutput) Output(entry eosc.IEntry) error

func (*HttpOutput) Reset

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

func (*HttpOutput) Start

func (h *HttpOutput) Start() error

func (*HttpOutput) Stop

func (h *HttpOutput) Stop() error

Jump to

Keyboard shortcuts

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