loki

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

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 注册nsqd驱动工厂

Types

type Config

type Config struct {
	Url       string               `json:"url" yaml:"url" label:"请求地址"`
	Method    string               `json:"method" label:"请求方法" enum:"POST,PUT" default:"POST"`
	Scopes    []string             `json:"scopes" label:"作用域"`
	Headers   map[string]string    `json:"headers" yaml:"headers" label:"请求头"`
	Labels    map[string]string    `json:"labels" label:"标签"`
	Type      string               `json:"type" yaml:"type" enum:"json,line" label:"输出格式"`
	Formatter eosc.FormatterConfig `json:"formatter" yaml:"formatter" label:"格式化配置"`
}

type Output

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

func (*Output) CheckSkill

func (o *Output) CheckSkill(skill string) bool

func (*Output) Close

func (o *Output) Close() error

func (*Output) Output

func (o *Output) Output(entry eosc.IEntry) error

func (*Output) Reset

func (o *Output) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) error

func (*Output) Start

func (o *Output) Start() error

func (*Output) Stop

func (o *Output) Stop() error

type Request

type Request struct {
	Streams []*Stream `json:"streams"`
}

type Stream

type Stream struct {
	Stream map[string]string `json:"stream"`
	Values [][]interface{}   `json:"values"`
}

Jump to

Keyboard shortcuts

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