Documentation
¶
Index ¶
- func NewCache(logger *zerolog.Logger, cacheType CacheType, config CacheConfig) (cache.CacheInterface, error)
- type CacheConfig
- type CacheType
- type Nats
- func (n *Nats) Clear(ctx context.Context) error
- func (n *Nats) Delete(ctx context.Context, key interface{}) error
- func (n *Nats) Get(ctx context.Context, key interface{}) (interface{}, error)
- func (n *Nats) GetType() string
- func (n *Nats) Invalidate(ctx context.Context, options store.InvalidateOptions) error
- func (n *Nats) Set(ctx context.Context, key, object interface{}, options *store.Options) error
- type NatsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCache ¶
func NewCache(logger *zerolog.Logger, cacheType CacheType, config CacheConfig) (cache.CacheInterface, error)
Types ¶
type CacheConfig ¶
type CacheType ¶
type CacheType int // definit aici ca enum
func (CacheType) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (*CacheType) UnmarshalJSON ¶
UnmarshalJSON un-marshalls a quoted json string to the enum value
type Nats ¶
type Nats struct { Conn *nats.Conn KV nats.KeyValue // contains filtered or unexported fields }
func NewNatsJSCache ¶
func NewNatsJSCache(logger *zerolog.Logger, cfg NatsConfig) (*Nats, error)
func (*Nats) Invalidate ¶
Click to show internal directories.
Click to hide internal directories.