f3nats

package module
v0.0.0-...-17eb709 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NatsConn

type NatsConn interface {
	SetDisconnectHandler(dcb nats.ConnHandler)
	SetReconnectHandler(rcb nats.ConnHandler)
	SetDiscoveredServersHandler(dscb nats.ConnHandler)
	SetClosedHandler(cb nats.ConnHandler)
	SetErrorHandler(cb nats.ErrHandler)
	ConnectedUrl() string
	ConnectedAddr() string
	ConnectedServerId() string
	LastError() error
	Publish(subj string, data []byte) error
	PublishMsg(m *nats.Msg) error
	PublishRequest(subj, reply string, data []byte) error
	Request(subj string, data []byte, timeout time.Duration) (*nats.Msg, error)
	NewRespInbox() string
	Subscribe(subj string, cb nats.MsgHandler) (*nats.Subscription, error)
	ChanSubscribe(subj string, ch chan *nats.Msg) (*nats.Subscription, error)
	ChanQueueSubscribe(subj, group string, ch chan *nats.Msg) (*nats.Subscription, error)
	SubscribeSync(subj string) (*nats.Subscription, error)
	QueueSubscribe(subj, queue string, cb nats.MsgHandler) (*nats.Subscription, error)
	QueueSubscribeSync(subj, queue string) (*nats.Subscription, error)
	QueueSubscribeSyncWithChan(subj, queue string, ch chan *nats.Msg) (*nats.Subscription, error)
	NumSubscriptions() int
	FlushTimeout(timeout time.Duration) (err error)
	Flush() error
	Buffered() (int, error)
	Close()
	IsClosed() bool
	IsReconnecting() bool
	IsConnected() bool
	Drain() error
	IsDraining() bool
	Servers() []string
	DiscoveredServers() []string
	Status() nats.Status
	Stats() nats.Statistics
	MaxPayload() int64
	AuthRequired() bool
	TLSRequired() bool
	Barrier(f func()) error
	GetClientID() (uint64, error)
	RequestWithContext(ctx context.Context, subj string, data []byte) (*nats.Msg, error)
	FlushWithContext(ctx context.Context) error
}

type NatsSubscription

type NatsSubscription interface {
	Type() nats.SubscriptionType
	IsValid() bool
	Drain() error
	Unsubscribe() error
	AutoUnsubscribe(max int) error
	NextMsg(timeout time.Duration) (*nats.Msg, error)
	QueuedMsgs() (int, error)
	Pending() (int, int, error)
	MaxPending() (int, int, error)
	ClearMaxPending() error
	PendingLimits() (int, int, error)
	SetPendingLimits(msgLimit, bytesLimit int) error
	Delivered() (int64, error)
	Dropped() (int, error)
	NextMsgWithContext(ctx context.Context) (*nats.Msg, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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