Documentation ¶
Index ¶
- Constants
- func WithNatsOptionExitOnStreamNotFound(exitOnStreamNotFound bool) func(opt *NatsConsumerOptions)
- func WithNatsOptionInterceptors(interceptors ...UnaryInterceptorFunc) func(opt *NatsConsumerOptions)
- type ConfirmationType
- type Consumer
- type Fn
- type MessageRequest
- type NatsConsumer
- type NatsConsumerConfiguration
- type NatsConsumerOptions
- type Spec
- type UnaryFunc
- type UnaryInterceptorFunc
Constants ¶
View Source
const ( ConfirmationTypeNack = ConfirmationType(0) ConfirmationTypeAck = ConfirmationType(1) )
Variables ¶
This section is empty.
Functions ¶
func WithNatsOptionExitOnStreamNotFound ¶
func WithNatsOptionExitOnStreamNotFound(exitOnStreamNotFound bool) func(opt *NatsConsumerOptions)
func WithNatsOptionInterceptors ¶
func WithNatsOptionInterceptors(interceptors ...UnaryInterceptorFunc) func(opt *NatsConsumerOptions)
Types ¶
type ConfirmationType ¶
type ConfirmationType byte
type Consumer ¶
func NewNatsConsumer ¶
func NewNatsConsumer[T any]( natsJetStream nats.JetStreamContext, cfg NatsConsumerConfiguration, fn Fn[T], options ...func(opts *NatsConsumerOptions), ) Consumer[T]
type MessageRequest ¶
type NatsConsumer ¶
type NatsConsumer[T any] struct { // contains filtered or unexported fields }
func (*NatsConsumer[T]) Close ¶
func (n *NatsConsumer[T]) Close() error
func (*NatsConsumer[T]) ConsumeAsync ¶
func (n *NatsConsumer[T]) ConsumeAsync() error
type NatsConsumerOptions ¶
type NatsConsumerOptions struct {
// contains filtered or unexported fields
}
type UnaryFunc ¶
type UnaryFunc = func(ctx context.Context, request MessageRequest) (ConfirmationType, error)
type UnaryInterceptorFunc ¶
Click to show internal directories.
Click to hide internal directories.