fakeyagnats

package
Version: v0.0.0-...-c259db3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2015 License: Apache-2.0, BSD-3-Clause, Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeNATSConn

type FakeNATSConn struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func Connect

func Connect() *FakeNATSConn

func (*FakeNATSConn) AddClosedCB

func (f *FakeNATSConn) AddClosedCB(_ func(*nats.Conn))

func (*FakeNATSConn) AddDisconnectedCB

func (f *FakeNATSConn) AddDisconnectedCB(_ func(*nats.Conn))

func (*FakeNATSConn) AddReconnectedCB

func (f *FakeNATSConn) AddReconnectedCB(_ func(*nats.Conn))

func (*FakeNATSConn) Close

func (f *FakeNATSConn) Close()

func (*FakeNATSConn) OnPing

func (f *FakeNATSConn) OnPing(onPingCallback func() bool)

func (*FakeNATSConn) Ping

func (f *FakeNATSConn) Ping() bool

func (*FakeNATSConn) Publish

func (f *FakeNATSConn) Publish(subject string, payload []byte) error

func (*FakeNATSConn) PublishRequest

func (f *FakeNATSConn) PublishRequest(subject, reply string, payload []byte) error

func (*FakeNATSConn) PublishedMessageCount

func (f *FakeNATSConn) PublishedMessageCount() int

func (*FakeNATSConn) PublishedMessages

func (f *FakeNATSConn) PublishedMessages(subject string) []*nats.Msg

func (*FakeNATSConn) QueueSubscribe

func (f *FakeNATSConn) QueueSubscribe(subject, queue string, callback nats.MsgHandler) (*nats.Subscription, error)

func (*FakeNATSConn) Reset

func (f *FakeNATSConn) Reset()

func (*FakeNATSConn) SubjectCallbacks

func (f *FakeNATSConn) SubjectCallbacks(subject string) []nats.MsgHandler

func (*FakeNATSConn) Subscribe

func (f *FakeNATSConn) Subscribe(subject string, callback nats.MsgHandler) (*nats.Subscription, error)

func (*FakeNATSConn) SubscriptionCount

func (f *FakeNATSConn) SubscriptionCount() int

func (*FakeNATSConn) Subscriptions

func (f *FakeNATSConn) Subscriptions(subject string) []*nats.Subscription

func (*FakeNATSConn) Unsubscribe

func (f *FakeNATSConn) Unsubscribe(subscription *nats.Subscription) error

func (*FakeNATSConn) WhenPublishing

func (f *FakeNATSConn) WhenPublishing(subject string, callback func(*nats.Msg) error)

func (*FakeNATSConn) WhenSubscribing

func (f *FakeNATSConn) WhenSubscribing(subject string, callback func(nats.MsgHandler) error)

type FakeYagnats

type FakeYagnats struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New() *FakeYagnats

func (*FakeYagnats) Connect

func (f *FakeYagnats) Connect(connectionProvider yagnats.ConnectionProvider) error

func (*FakeYagnats) ConnectedConnectionProvider

func (f *FakeYagnats) ConnectedConnectionProvider() yagnats.ConnectionProvider

func (*FakeYagnats) Disconnect

func (f *FakeYagnats) Disconnect()

func (*FakeYagnats) OnPing

func (f *FakeYagnats) OnPing(onPingCallback func() bool)

func (*FakeYagnats) Ping

func (f *FakeYagnats) Ping() bool

func (*FakeYagnats) Publish

func (f *FakeYagnats) Publish(subject string, payload []byte) error

func (*FakeYagnats) PublishWithReplyTo

func (f *FakeYagnats) PublishWithReplyTo(subject, reply string, payload []byte) error

func (*FakeYagnats) PublishedMessageCount

func (f *FakeYagnats) PublishedMessageCount() int

func (*FakeYagnats) PublishedMessages

func (f *FakeYagnats) PublishedMessages(subject string) []yagnats.Message

func (*FakeYagnats) Reset

func (f *FakeYagnats) Reset()

func (*FakeYagnats) Subscribe

func (f *FakeYagnats) Subscribe(subject string, callback yagnats.Callback) (int64, error)

func (*FakeYagnats) SubscribeWithQueue

func (f *FakeYagnats) SubscribeWithQueue(subject, queue string, callback yagnats.Callback) (int64, error)

func (*FakeYagnats) SubscriptionCount

func (f *FakeYagnats) SubscriptionCount() int

func (*FakeYagnats) Subscriptions

func (f *FakeYagnats) Subscriptions(subject string) []yagnats.Subscription

func (*FakeYagnats) Unsubscribe

func (f *FakeYagnats) Unsubscribe(subscription int64) error

func (*FakeYagnats) UnsubscribeAll

func (f *FakeYagnats) UnsubscribeAll(subject string)

func (*FakeYagnats) WhenPublishing

func (f *FakeYagnats) WhenPublishing(subject string, callback func(*yagnats.Message) error)

func (*FakeYagnats) WhenSubscribing

func (f *FakeYagnats) WhenSubscribing(subject string, callback func(yagnats.Callback) error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL