Documentation
¶
Index ¶
- Constants
- Variables
- func GetJetstreamMsgContext(msg jetstream.Msg) (spanContext trace.SpanContext, err error)
- func GetNatsMsgContext(msg *nats.Msg) (spanContext trace.SpanContext, err error)
- type ConsumeErrRestartFn
- type JSWrapper
- func (j *JSWrapper) ConsumeErrHandler(logger *zap.Logger) jetstream.PullConsumeOpt
- func (j *JSWrapper) ConsumeErrHandlerWithRestart(c context.Context, logger *zap.Logger, restartFn ConsumeErrRestartFn) jetstream.PullConsumeOpt
- func (j *JSWrapper) CreateOrUpdateKeyValue(ctx context.Context, cfg jetstream.KeyValueConfig) (jetstream.KeyValue, error)
- func (j *JSWrapper) CreateOrUpdateStream(ctx context.Context, cfg jetstream.StreamConfig) (jetstream.Stream, error)
- func (j *JSWrapper) Publish(ctx context.Context, subject string, payload []byte, ...) (*jetstream.PubAck, error)
- func (j *JSWrapper) PublishAsync(ctx context.Context, subject string, payload []byte, ...) (jetstream.PubAckFuture, error)
- func (j *JSWrapper) PublishMsg(ctx context.Context, msg *nats.Msg, opts ...jetstream.PublishOpt) (*jetstream.PubAck, error)
- func (j *JSWrapper) PublishMsgAsync(ctx context.Context, msg *nats.Msg, opts ...jetstream.PublishOpt) (jetstream.PubAckFuture, error)
- type Params
- type Result
- type Subject
- type Topic
- type Type
Constants ¶
View Source
const ( MaxRestartRetries = 5 InitialRestartBackoffTime = 150 * time.Millisecond )
View Source
const DefaultDefaultAsyncPubAckInflight = 256
Default `defaultAsyncPubAckInflight` is `4000` (`nats.go`)
View Source
const DescriptionPrefix = "FiveNet: "
Variables ¶
Functions ¶
func GetJetstreamMsgContext ¶ added in v0.8.21
func GetJetstreamMsgContext(msg jetstream.Msg) (spanContext trace.SpanContext, err error)
func GetNatsMsgContext ¶ added in v0.8.21
func GetNatsMsgContext(msg *nats.Msg) (spanContext trace.SpanContext, err error)
Types ¶
type ConsumeErrRestartFn ¶ added in v0.8.21
type JSWrapper ¶ added in v0.8.21
Ensures certain NATS config options are applied
func NewJSWrapper ¶ added in v0.8.21
func (*JSWrapper) ConsumeErrHandler ¶ added in v0.8.21
func (j *JSWrapper) ConsumeErrHandler(logger *zap.Logger) jetstream.PullConsumeOpt
func (*JSWrapper) ConsumeErrHandlerWithRestart ¶ added in v0.8.21
func (j *JSWrapper) ConsumeErrHandlerWithRestart(c context.Context, logger *zap.Logger, restartFn ConsumeErrRestartFn) jetstream.PullConsumeOpt
func (*JSWrapper) CreateOrUpdateKeyValue ¶ added in v0.8.21
func (*JSWrapper) CreateOrUpdateStream ¶ added in v0.8.21
func (*JSWrapper) PublishAsync ¶ added in v0.8.21
func (j *JSWrapper) PublishAsync(ctx context.Context, subject string, payload []byte, opts ...jetstream.PublishOpt) (jetstream.PubAckFuture, error)
func (*JSWrapper) PublishMsg ¶ added in v0.8.21
func (*JSWrapper) PublishMsgAsync ¶ added in v0.8.21
func (j *JSWrapper) PublishMsgAsync(ctx context.Context, msg *nats.Msg, opts ...jetstream.PublishOpt) (jetstream.PubAckFuture, error)
Click to show internal directories.
Click to hide internal directories.