Documentation ¶
Index ¶
Constants ¶
View Source
const ( //OffsetStartAt - to start at a given msg number" OffsetStartAt = Offset(iota) //OffsetDeliverLast - deliver from the last message OffsetDeliverLast //OffsetDeliverAll - deliver all the messages form the beginning OffsetDeliverAll //OffsetStartDuration - deliver messages from a certain time OffsetStartDuration )
Variables ¶
View Source
var ErrConnLost = errors.New("nats streaming connection lost")
ErrConnLost is the error created when the underlying nats streaming client has established that the connection to the nats streaming server has been lost
View Source
var ErrNotConnected = errors.New("nats not connected")
ErrNotConnected is returned if a status is requested before the connection has been initialized
Functions ¶
func NewMessageSink ¶
func NewMessageSink(config MessageSinkConfig) (pubsub.MessageSink, error)
func NewMessageSource ¶
func NewMessageSource(conf MessageSourceConfig) (pubsub.MessageSource, error)
Types ¶
type MessageSinkConfig ¶
type MessageSourceConfig ¶
type MessageSourceConfig struct { NatsURL string ClusterID string Topic string ConsumerID string //Offset - offset used for consuming messages Offset Offset //OffsetStartAtIndex - start delivering messages from this index OffsetStartAtIndex uint64 //OffsetStartDuration - start delivering messages from this duration ago OffsetStartDuration time.Duration NonDurable bool AckWait *time.Duration MaxInflight *int }
Click to show internal directories.
Click to hide internal directories.