nsq

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProducerPool

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

Create

func Register

func Register(register eosc.IExtenderDriverRegister)

Register 注册nsqd驱动工厂

Types

type Config

type Config struct {
	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:"输出格式"`
	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 NsqOutput

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

func (*NsqOutput) CheckSkill

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

func (*NsqOutput) Id

func (n *NsqOutput) Id() string

func (*NsqOutput) Output

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

func (*NsqOutput) Reset

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

func (*NsqOutput) Start

func (n *NsqOutput) Start() error

func (*NsqOutput) Stop

func (n *NsqOutput) Stop() error

Jump to

Keyboard shortcuts

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