Versions in this module Expand all Collapse all v1 v1.1.0 May 23, 2022 v1.0.3 May 16, 2022 v1.0.1 Apr 29, 2022 v1.0.0 Apr 1, 2022 Changes in this version + const DataStream + const PrivateTransactionsStream + const PrivateTransactionsSubject + const TransactionsStream + type Config struct + Hostname string + Port int + StorageDir string + Timeout int + func DefaultConfig() Config + type Conn interface + Close func() + JetStream func(opts ...nats.JSOpt) (nats.JetStreamContext, error) + type ConnectionPool interface + Acquire func(ctx context.Context) (Conn, JetStreamContext, error) + Shutdown func() + type Event interface + GetStream func(streamName string) Stream + Pool func() ConnectionPool + func NewManager() Event + type JetStreamContext interface + type MockConn struct + func NewMockConn(ctrl *gomock.Controller) *MockConn + func (m *MockConn) Close() + func (m *MockConn) EXPECT() *MockConnMockRecorder + func (m *MockConn) JetStream(opts ...nats_go.JSOpt) (nats_go.JetStreamContext, error) + type MockConnMockRecorder struct + func (mr *MockConnMockRecorder) Close() *gomock.Call + func (mr *MockConnMockRecorder) JetStream(opts ...interface{}) *gomock.Call + type MockConnectionPool struct + func NewMockConnectionPool(ctrl *gomock.Controller) *MockConnectionPool + func (m *MockConnectionPool) Acquire(ctx context.Context) (Conn, JetStreamContext, error) + func (m *MockConnectionPool) EXPECT() *MockConnectionPoolMockRecorder + func (m *MockConnectionPool) Shutdown() + type MockConnectionPoolMockRecorder struct + func (mr *MockConnectionPoolMockRecorder) Acquire(ctx interface{}) *gomock.Call + func (mr *MockConnectionPoolMockRecorder) Shutdown() *gomock.Call + type MockEvent struct + func NewMockEvent(ctrl *gomock.Controller) *MockEvent + func (m *MockEvent) EXPECT() *MockEventMockRecorder + func (m *MockEvent) GetStream(streamName string) Stream + func (m *MockEvent) Pool() ConnectionPool + type MockEventMockRecorder struct + func (mr *MockEventMockRecorder) GetStream(streamName interface{}) *gomock.Call + func (mr *MockEventMockRecorder) Pool() *gomock.Call + type MockJetStreamContext struct + func NewMockJetStreamContext(ctrl *gomock.Controller) *MockJetStreamContext + func (m *MockJetStreamContext) AccountInfo(opts ...nats_go.JSOpt) (*nats_go.AccountInfo, error) + func (m *MockJetStreamContext) AddConsumer(stream string, cfg *nats_go.ConsumerConfig, opts ...nats_go.JSOpt) (*nats_go.ConsumerInfo, error) + func (m *MockJetStreamContext) AddStream(cfg *nats_go.StreamConfig, opts ...nats_go.JSOpt) (*nats_go.StreamInfo, error) + func (m *MockJetStreamContext) ChanQueueSubscribe(subj, queue string, ch chan *nats_go.Msg, opts ...nats_go.SubOpt) (*nats_go.Subscription, error) + func (m *MockJetStreamContext) ChanSubscribe(subj string, ch chan *nats_go.Msg, opts ...nats_go.SubOpt) (*nats_go.Subscription, error) + func (m *MockJetStreamContext) ConsumerInfo(stream, name string, opts ...nats_go.JSOpt) (*nats_go.ConsumerInfo, error) + func (m *MockJetStreamContext) ConsumerNames(stream string, opts ...nats_go.JSOpt) <-chan string + func (m *MockJetStreamContext) ConsumersInfo(stream string, opts ...nats_go.JSOpt) <-chan *nats_go.ConsumerInfo + func (m *MockJetStreamContext) CreateKeyValue(cfg *nats_go.KeyValueConfig) (nats_go.KeyValue, error) + func (m *MockJetStreamContext) CreateObjectStore(cfg *nats_go.ObjectStoreConfig) (nats_go.ObjectStore, error) + func (m *MockJetStreamContext) DeleteConsumer(stream, consumer string, opts ...nats_go.JSOpt) error + func (m *MockJetStreamContext) DeleteKeyValue(bucket string) error + func (m *MockJetStreamContext) DeleteMsg(name string, seq uint64, opts ...nats_go.JSOpt) error + func (m *MockJetStreamContext) DeleteObjectStore(bucket string) error + func (m *MockJetStreamContext) DeleteStream(name string, opts ...nats_go.JSOpt) error + func (m *MockJetStreamContext) EXPECT() *MockJetStreamContextMockRecorder + func (m *MockJetStreamContext) GetMsg(name string, seq uint64, opts ...nats_go.JSOpt) (*nats_go.RawStreamMsg, error) + func (m *MockJetStreamContext) KeyValue(bucket string) (nats_go.KeyValue, error) + func (m *MockJetStreamContext) ObjectStore(bucket string) (nats_go.ObjectStore, error) + func (m *MockJetStreamContext) Publish(subj string, data []byte, opts ...nats_go.PubOpt) (*nats_go.PubAck, error) + func (m *MockJetStreamContext) PublishAsync(subj string, data []byte, opts ...nats_go.PubOpt) (nats_go.PubAckFuture, error) + func (m *MockJetStreamContext) PublishAsyncComplete() <-chan struct{} + func (m *MockJetStreamContext) PublishAsyncPending() int + func (m *MockJetStreamContext) PullSubscribe(subj, durable string, opts ...nats_go.SubOpt) (*nats_go.Subscription, error) + func (m *MockJetStreamContext) PurgeStream(name string, opts ...nats_go.JSOpt) error + func (m *MockJetStreamContext) QueueSubscribe(subj, queue string, cb nats_go.MsgHandler, opts ...nats_go.SubOpt) (*nats_go.Subscription, error) + func (m *MockJetStreamContext) QueueSubscribeSync(subj, queue string, opts ...nats_go.SubOpt) (*nats_go.Subscription, error) + func (m *MockJetStreamContext) StreamInfo(stream string, opts ...nats_go.JSOpt) (*nats_go.StreamInfo, error) + func (m *MockJetStreamContext) StreamNames(opts ...nats_go.JSOpt) <-chan string + func (m *MockJetStreamContext) StreamsInfo(opts ...nats_go.JSOpt) <-chan *nats_go.StreamInfo + func (m *MockJetStreamContext) Subscribe(subj string, cb nats_go.MsgHandler, opts ...nats_go.SubOpt) (*nats_go.Subscription, error) + func (m *MockJetStreamContext) SubscribeSync(subj string, opts ...nats_go.SubOpt) (*nats_go.Subscription, error) + func (m *MockJetStreamContext) UpdateConsumer(stream string, cfg *nats_go.ConsumerConfig, opts ...nats_go.JSOpt) (*nats_go.ConsumerInfo, error) + func (m *MockJetStreamContext) UpdateStream(cfg *nats_go.StreamConfig, opts ...nats_go.JSOpt) (*nats_go.StreamInfo, error) + func (m_2 *MockJetStreamContext) PublishMsg(m *nats_go.Msg, opts ...nats_go.PubOpt) (*nats_go.PubAck, error) + func (m_2 *MockJetStreamContext) PublishMsgAsync(m *nats_go.Msg, opts ...nats_go.PubOpt) (nats_go.PubAckFuture, error) + type MockJetStreamContextMockRecorder struct + func (mr *MockJetStreamContextMockRecorder) AccountInfo(opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) AddConsumer(stream, cfg interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) AddStream(cfg interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) ChanQueueSubscribe(subj, queue, ch interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) ChanSubscribe(subj, ch interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) ConsumerInfo(stream, name interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) ConsumerNames(stream interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) ConsumersInfo(stream interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) CreateKeyValue(cfg interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) CreateObjectStore(cfg interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) DeleteConsumer(stream, consumer interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) DeleteKeyValue(bucket interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) DeleteMsg(name, seq interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) DeleteObjectStore(bucket interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) DeleteStream(name interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) GetMsg(name, seq interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) KeyValue(bucket interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) ObjectStore(bucket interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) Publish(subj, data interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) PublishAsync(subj, data interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) PublishAsyncComplete() *gomock.Call + func (mr *MockJetStreamContextMockRecorder) PublishAsyncPending() *gomock.Call + func (mr *MockJetStreamContextMockRecorder) PublishMsg(m interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) PublishMsgAsync(m interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) PullSubscribe(subj, durable interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) PurgeStream(name interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) QueueSubscribe(subj, queue, cb interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) QueueSubscribeSync(subj, queue interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) StreamInfo(stream interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) StreamNames(opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) StreamsInfo(opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) Subscribe(subj, cb interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) SubscribeSync(subj interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) UpdateConsumer(stream, cfg interface{}, opts ...interface{}) *gomock.Call + func (mr *MockJetStreamContextMockRecorder) UpdateStream(cfg interface{}, opts ...interface{}) *gomock.Call + type NATSConnectFunc func(url string, options ...nats.Option) (Conn, error) + type NATSConnectionPool struct + func NewNATSConnectionPool(config Config) *NATSConnectionPool + func (pool *NATSConnectionPool) Acquire(ctx context.Context) (Conn, JetStreamContext, error) + func (pool *NATSConnectionPool) Shutdown() + type Stream interface + ClientOpts func() []nats.SubOpt + Config func() *nats.StreamConfig + Subscribe func(conn Conn, consumerName string, subjectFilter string, handler nats.MsgHandler) error + func NewDisposableStream(name string, subjects []string, maxMessages int64) Stream