nsq

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create added in v0.9.0

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

func CreateProducerPool

func CreateProducerPool(addrs []string, authSecret string, conf map[string]interface{}) (*producerPool, error)

Create

func NewFactory

func NewFactory() eosc.IExtenderDriverFactory

func Register

func Register(register eosc.IExtenderDriverRegister)

Register 注册nsqd驱动工厂

Types

type Config

type Config struct {
	Scopes        []string               `json:"scopes" label:"作用域"`
	Topic         string                 `json:"topic" yaml:"topic" label:"topic"`
	Address       []string               `json:"address" yaml:"address" label:"请求地址"`
	AuthSecret    string                 `json:"auth_secret" yaml:"auth_secret" label:"鉴权secret"`
	ClientConf    map[string]interface{} `json:"nsq_conf" yaml:"nsq_conf" skip:""`
	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 NsqOutput

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

func (*NsqOutput) CheckSkill

func (n *NsqOutput) CheckSkill(skill string) bool

func (*NsqOutput) Output

func (n *NsqOutput) Output(entry eosc.IEntry) error

func (*NsqOutput) Reset

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

func (*NsqOutput) Start

func (n *NsqOutput) Start() error

func (*NsqOutput) Stop

func (n *NsqOutput) Stop() error

type Writer added in v0.8.0

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

func NewWriter added in v0.8.0

func NewWriter() *Writer

Jump to

Keyboard shortcuts

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