Documentation ¶
Index ¶
- type InfraSetup
- type JetStream
- type JetStreamInfo
- func (jetstream *JetStreamInfo) Close()
- func (jetstream *JetStreamInfo) CreateConsumer(streamName string, consumerOpts ...jsm.ConsumerOption) error
- func (jetstream *JetStreamInfo) CreateStream(streamName string, streamOpts ...jsm.StreamOption) error
- func (jetstream *JetStreamInfo) IsStreamAvailable(streamName string) (bool, error)
- type MockNats
- type Nats
- type NatsImpl
- type NatsMessage
- func (m *NatsMessage) Ack()
- func (m *NatsMessage) AddHeader(key string, value string)
- func (m *NatsMessage) GetBody() []byte
- func (m *NatsMessage) GetHeader(key string) string
- func (m *NatsMessage) GetHeaders() map[string][]string
- func (m *NatsMessage) GetUnderlyingNatsMessage() *nats.Msg
- func (m *NatsMessage) Nack()
- func (m *NatsMessage) SetBody(body []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfraSetup ¶
type InfraSetup struct {
// contains filtered or unexported fields
}
func NewInfraSetup ¶
func (*InfraSetup) Setup ¶
func (i *InfraSetup) Setup() error
type JetStreamInfo ¶
type JetStreamInfo struct {
// contains filtered or unexported fields
}
func NewJetStream ¶
func NewJetStream(seedFile string, natsUri string) (*JetStreamInfo, error)
func (*JetStreamInfo) Close ¶
func (jetstream *JetStreamInfo) Close()
func (*JetStreamInfo) CreateConsumer ¶
func (jetstream *JetStreamInfo) CreateConsumer(streamName string, consumerOpts ...jsm.ConsumerOption) error
func (*JetStreamInfo) CreateStream ¶
func (jetstream *JetStreamInfo) CreateStream(streamName string, streamOpts ...jsm.StreamOption) error
func (*JetStreamInfo) IsStreamAvailable ¶
func (jetstream *JetStreamInfo) IsStreamAvailable(streamName string) (bool, error)
type MockNats ¶
func (*MockNats) Publish ¶
func (m *MockNats) Publish(msg *NatsMessage) error
type Nats ¶
type Nats interface { Publish(msg *NatsMessage) error Subscribe(subject, consumerName string) error Fetch(messageCount int, ctx context.Context) ([]*NatsMessage, error) Close() }
type NatsImpl ¶
type NatsImpl struct {
// contains filtered or unexported fields
}
func (*NatsImpl) Publish ¶
func (n *NatsImpl) Publish(msg *NatsMessage) error
type NatsMessage ¶
type NatsMessage struct {
// contains filtered or unexported fields
}
func NewNatsMessage ¶
func NewNatsMessage(subject string) *NatsMessage
func (*NatsMessage) Ack ¶
func (m *NatsMessage) Ack()
func (*NatsMessage) AddHeader ¶
func (m *NatsMessage) AddHeader(key string, value string)
func (*NatsMessage) GetBody ¶
func (m *NatsMessage) GetBody() []byte
func (*NatsMessage) GetHeader ¶
func (m *NatsMessage) GetHeader(key string) string
func (*NatsMessage) GetHeaders ¶
func (m *NatsMessage) GetHeaders() map[string][]string
func (*NatsMessage) GetUnderlyingNatsMessage ¶
func (m *NatsMessage) GetUnderlyingNatsMessage() *nats.Msg
func (*NatsMessage) Nack ¶
func (m *NatsMessage) Nack()
func (*NatsMessage) SetBody ¶
func (m *NatsMessage) SetBody(body []byte)
Click to show internal directories.
Click to hide internal directories.