Documentation ¶
Index ¶
- Variables
- func DefaultDescription(text string) store.Option
- func DefaultMemory() store.Option
- func DefaultTTL(ttl time.Duration) store.Option
- func DeleteBucket() store.DeleteOption
- func JetStreamOptions(opts ...nats.JSOpt) store.Option
- func NatsOptions(opts nats.Options) store.Option
- func NewStore(opts ...store.Option) store.Store
- func ObjectStoreOptions(cfg ...*nats.ObjectStoreConfig) store.Option
Constants ¶
This section is empty.
Variables ¶
var (
ErrBucketNotFound = errors.New("Bucket (database) not found")
)
Functions ¶
func DefaultDescription ¶
DefaultDescription sets the default description to use when creating new
buckets. The default is "Store managed by go-micro"
func DefaultMemory ¶
DefaultMemory sets the default storage type to memory only.
The default is file storage, persisting storage between service restarts.
Be aware that the default storage location of NATS the /tmp dir is, and thus
won't persist reboots.
func DefaultTTL ¶
DefaultTTL sets the default TTL to use for new buckets
By default no TTL is set.
TTL ON INDIVIDUAL WRITE CALLS IS NOT SUPPORTED, only bucket wide TTL. Either set a default TTL with this option or provide bucket specific options
with ObjectStoreOptions
func DeleteBucket ¶
func DeleteBucket() store.DeleteOption
DeleteBucket will use the key passed to Delete as a bucket (database) name,
and delete the bucket.
This option should not be combined with the store.DeleteFrom option, as
that will overwrite the delete action.
func JetStreamOptions ¶
JetStreamOptions accepts multiple nats.JSOpt.
func NatsOptions ¶
NatsOptions accepts nats.Options.
func ObjectStoreOptions ¶
ObjectStoreOptions accepts multiple nats.ObjectStoreConfigs This will create buckets with the provided configs at initialization.
Types ¶
This section is empty.