kv

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrBindKVBucket

func CreateOrBindKVBucket(handle *events.NatsJetstream, bucketName string,
	opts ...Option) (nats.KeyValue, error)

func DefaultKVConfig

func DefaultKVConfig(bucketName string) *nats.KeyValueConfig

DefaultKVConfig returns a configuration with "mostly sane" defaults. Override with the following Option functions

Types

type Option

type Option func(c *nats.KeyValueConfig)

func WithDescription

func WithDescription(desc string) Option

func WithReplicas

func WithReplicas(replicas int) Option

func WithStorageType

func WithStorageType(st nats.StorageType) Option

XXX: Not really sure we'd ever change this but...

func WithTTL

func WithTTL(d time.Duration) Option

Jump to

Keyboard shortcuts

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