Documentation ¶
Index ¶
- type FakeNATSClient
- func (f *FakeNATSClient) Close()
- func (f *FakeNATSClient) Connect(urls []string) (chan struct{}, error)
- func (f *FakeNATSClient) OnPing(onPingCallback func() bool)
- func (f *FakeNATSClient) Ping() bool
- func (f *FakeNATSClient) Publish(subject string, payload []byte) error
- func (f *FakeNATSClient) PublishRequest(subject, reply string, payload []byte) error
- func (f *FakeNATSClient) PublishedMessageCount() int
- func (f *FakeNATSClient) PublishedMessages(subject string) []*nats.Msg
- func (f *FakeNATSClient) QueueSubscribe(subject, queue string, callback nats.MsgHandler) (*nats.Subscription, error)
- func (f *FakeNATSClient) Request(subj string, data []byte, timeout time.Duration) (m *nats.Msg, err error)
- func (f *FakeNATSClient) Reset()
- func (f *FakeNATSClient) SubjectCallbacks(subject string) []nats.MsgHandler
- func (f *FakeNATSClient) Subscribe(subject string, callback nats.MsgHandler) (*nats.Subscription, error)
- func (f *FakeNATSClient) SubscriptionCount() int
- func (f *FakeNATSClient) Subscriptions(subject string) []*nats.Subscription
- func (f *FakeNATSClient) Unsubscribe(subscription *nats.Subscription) error
- func (f *FakeNATSClient) WhenPublishing(subject string, callback func(*nats.Msg) error)
- func (f *FakeNATSClient) WhenSubscribing(subject string, callback func(nats.MsgHandler) error)
- type NATSClient
- type NATSClientRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeNATSClient ¶
func NewFakeClient ¶
func NewFakeClient() *FakeNATSClient
func (*FakeNATSClient) Close ¶
func (f *FakeNATSClient) Close()
func (*FakeNATSClient) Connect ¶
func (f *FakeNATSClient) Connect(urls []string) (chan struct{}, error)
func (*FakeNATSClient) OnPing ¶
func (f *FakeNATSClient) OnPing(onPingCallback func() bool)
func (*FakeNATSClient) Ping ¶
func (f *FakeNATSClient) Ping() bool
func (*FakeNATSClient) Publish ¶
func (f *FakeNATSClient) Publish(subject string, payload []byte) error
func (*FakeNATSClient) PublishRequest ¶
func (f *FakeNATSClient) PublishRequest(subject, reply string, payload []byte) error
func (*FakeNATSClient) PublishedMessageCount ¶
func (f *FakeNATSClient) PublishedMessageCount() int
func (*FakeNATSClient) PublishedMessages ¶
func (f *FakeNATSClient) PublishedMessages(subject string) []*nats.Msg
func (*FakeNATSClient) QueueSubscribe ¶
func (f *FakeNATSClient) QueueSubscribe(subject, queue string, callback nats.MsgHandler) (*nats.Subscription, error)
func (*FakeNATSClient) Reset ¶
func (f *FakeNATSClient) Reset()
func (*FakeNATSClient) SubjectCallbacks ¶
func (f *FakeNATSClient) SubjectCallbacks(subject string) []nats.MsgHandler
func (*FakeNATSClient) Subscribe ¶
func (f *FakeNATSClient) Subscribe(subject string, callback nats.MsgHandler) (*nats.Subscription, error)
func (*FakeNATSClient) SubscriptionCount ¶
func (f *FakeNATSClient) SubscriptionCount() int
func (*FakeNATSClient) Subscriptions ¶
func (f *FakeNATSClient) Subscriptions(subject string) []*nats.Subscription
func (*FakeNATSClient) Unsubscribe ¶
func (f *FakeNATSClient) Unsubscribe(subscription *nats.Subscription) error
func (*FakeNATSClient) WhenPublishing ¶
func (f *FakeNATSClient) WhenPublishing(subject string, callback func(*nats.Msg) error)
func (*FakeNATSClient) WhenSubscribing ¶
func (f *FakeNATSClient) WhenSubscribing(subject string, callback func(nats.MsgHandler) error)
type NATSClient ¶
type NATSClient interface { Connect(urls []string) (chan struct{}, error) Close() Ping() bool Unsubscribe(sub *nats.Subscription) error // Via apcera/nats.Conn Publish(subject string, data []byte) error PublishRequest(subj, reply string, data []byte) error Request(subj string, data []byte, timeout time.Duration) (m *nats.Msg, err error) Subscribe(subject string, handler nats.MsgHandler) (*nats.Subscription, error) QueueSubscribe(subject, queue string, handler nats.MsgHandler) (*nats.Subscription, error) }
func NewClient ¶
func NewClient() NATSClient
type NATSClientRunner ¶
type NATSClientRunner struct {
// contains filtered or unexported fields
}
func NewClientRunner ¶
func NewClientRunner(addresses, username, password string, logger lager.Logger, client NATSClient) NATSClientRunner
Click to show internal directories.
Click to hide internal directories.