Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TypeMemory represents memory stores TypeMemory = "memory" // TypeNoop represents noop stores TypeNoop = "noop" // TypeEtcd represents etcd stores TypeEtcd = "etcd" // TypeRedis represents redis stores TypeRedis = "redis" // TypeRedisSentinel represents redis-sentinel stores TypeRedisSentinel = "redis-sentinel" // TypeOCMem represents ocmem stores TypeOCMem = "ocmem" // TypeNatsJS represents nats-js stores TypeNatsJS = "nats-js" )
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(opts ...microstore.Option) microstore.Store
Create initializes a new store
func Size ¶
Size configures the maximum capacity of the cache for the "ocmem" implementation, in number of items that the cache can hold per table. You can use 5000 to make the cache hold up to 5000 elements. The parameter only affects to the "ocmem" implementation, the rest will ignore it. If an invalid value is used, the default of 512 will be used instead.
func Store ¶
Store determines the implementation:
- "memory", for a in-memory implementation, which is also the default if noone matches
- "noop", for a noop store (it does nothing)
- "etcd", for etcd
- "nats-js" for nats-js, needs to have TTL configured at creation
- "redis", for redis
- "redis-sentinel", for redis-sentinel
- "ocmem", custom in-memory implementation, with fixed size and optimized prefix and suffix search
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.