jetstream

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJetStreamBufferReader

func NewJetStreamBufferReader(ctx context.Context, client jsclient.JetStreamClient, name, stream, subject string, opts ...ReadOption) (isb.BufferReader, error)

NewJetStreamBufferReader is used to provide a new JetStream buffer reader connection

func NewJetStreamBufferWriter

func NewJetStreamBufferWriter(ctx context.Context, client jsclient.JetStreamClient, name, stream, subject string, opts ...WriteOption) (isb.BufferWriter, error)

NewJetStreamBufferWriter is used to provide a new instance of JetStreamBufferWriter

Types

type ReadOption

type ReadOption func(*readOptions) error

func WithAckInfoCheckInterval

func WithAckInfoCheckInterval(t time.Duration) ReadOption

WithAckInfoCheckInterval is used to set the periodical ack information check interval

func WithReadTimeOut

func WithReadTimeOut(timeout time.Duration) ReadOption

WithReadTimeOut is used to set read timeout option

func WithUsingAckInfoAsRate

func WithUsingAckInfoAsRate(yes bool) ReadOption

WithUsingAckInfoAsRate is used to set whether to run ack information check in the reader, which is for ack rate calculation

type WriteOption

type WriteOption func(*writeOptions) error

func WithBufferUsageLimit

func WithBufferUsageLimit(usageLimit float64) WriteOption

WithBufferUsageLimit sets buffer usage limit option

func WithMaxLength

func WithMaxLength(length int64) WriteOption

WithMaxLength sets buffer max length option

func WithRefreshInterval

func WithRefreshInterval(refreshInterval time.Duration) WriteOption

WithRefreshInterval sets refresh interval option

func WithUsingWriteInfoAsRate

func WithUsingWriteInfoAsRate(yes bool) WriteOption

WithUsingWriteInfoAsRate sets whether to check sequence for rate calculation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL