jetstream

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 16 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.NATSClient, name, stream, subject string, partitionIdx int32, 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.NATSClient, name, stream, subject string, partitionIdx int32, opts ...WriteOption) (isb.BufferWriter, error)

NewJetStreamBufferWriter is used to provide a new instance of JetStreamBufferWriter

Types

type ReadOption

type ReadOption func(*readOptions) error

func WithReadTimeOut

func WithReadTimeOut(timeout time.Duration) ReadOption

WithReadTimeOut is used to set read timeout option

type WriteOption

type WriteOption func(*writeOptions) error

func WithBufferFullWritingStrategy added in v0.7.3

func WithBufferFullWritingStrategy(s dfv1.BufferFullWritingStrategy) WriteOption

WithBufferFullWritingStrategy sets the writing strategy when buffer is full

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

Jump to

Keyboard shortcuts

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