Documentation ¶
Index ¶
- func NewJetStreamBufferReader(ctx context.Context, client *jsclient.NATSClient, name, stream, subject string, ...) (isb.BufferReader, error)
- func NewJetStreamBufferWriter(ctx context.Context, client *jsclient.NATSClient, name, stream, subject string, ...) (isb.BufferWriter, error)
- type ReadOption
- type WriteOption
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
Click to show internal directories.
Click to hide internal directories.