pubsubnsq

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name pub-sub plug-in name
	Name = "PubsubNsq"
)

Variables

This section is empty.

Functions

func BuildWithOption

func BuildWithOption(info meta.ServiceInfo, log *blog.Logger, opts ...Option) module.IPubsub

Types

type Option

type Option func(*Parm)

Option config wraps

func WithChannelSize

func WithChannelSize(channelsize int32) Option

WithChannel 通过 channel 构建

func WithHandlerConcurrent

func WithHandlerConcurrent(cnt int32) Option

WithHandlerConcurrent 消费者接收句柄的并发数量(默认1

func WithLookupAddr

func WithLookupAddr(addr []string) Option

WithLookupAddr lookup addr

func WithNsqConfig

func WithNsqConfig(cfg nsq.Config) Option

WithNsqConfig nsq config

func WithNsqLogLv

func WithNsqLogLv(lv nsq.LogLevel) Option

WithNsqLogLv 修改nsq的日志等级

func WithNsqdAddr

func WithNsqdAddr(tcpAddr []string, httpAddr []string) Option

WithNsqdAddr nsqd addr

type Parm

type Parm struct {
	LookupdAddress  []string // lookupd 地址
	NsqdAddress     []string
	NsqdHttpAddress []string

	ConcurrentHandler int32 // consumer 接收句柄的并发数(默认1

	HA bool // 是否开启高可用,向每个nsqd发送消息

	ChannelLength int32 // 管道长度,如果设置为0则全部消息都落地到磁盘再进行消费

	NsqLogLv nsq.LogLevel
	// contains filtered or unexported fields
}

Parm nsq config

Jump to

Keyboard shortcuts

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