nats

package
v0.0.0-...-0231498 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNATSEventer

func NewNATSEventer(conf *Config) event.Eventer

Types

type Config

type Config struct {
	ClusterID   string // 集群ID
	ClientID    string // 客户端ID, 只能包含字母,-,_字符
	URL         string // nats 连接url
	MaxInflight int    // 未确认消息最大数量,默认1024
	AckWait     string // 消息确认最大超时时间,超过时间重复发送消息,默认30s
}

Config NATS配置

type NATSEventer

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

NATSEventer

func (*NATSEventer) Close

func (e *NATSEventer) Close() error

func (*NATSEventer) Publish

func (e *NATSEventer) Publish(evt event.Event) error

func (*NATSEventer) Subscribe

func (e *NATSEventer) Subscribe(subject string, durableID string, hdl event.EventHandler, opts ...event.SubscriptionOptions) (event.Subscription, error)

Jump to

Keyboard shortcuts

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