Documentation
¶
Index ¶
- Constants
- func NewInMemoryDriver(log logger.Logger, key string, cfgPlugin config.Configurer, stop chan struct{}) (kv.Storage, error)
- func NewPubSubDriver(log logger.Logger, _ string) (pubsub.PubSub, error)
- type Config
- type Driver
- func (s *Driver) Delete(keys ...string) error
- func (s *Driver) Get(key string) ([]byte, error)
- func (s *Driver) Has(keys ...string) (map[string]bool, error)
- func (s *Driver) MExpire(items ...*kvv1.Item) error
- func (s *Driver) MGet(keys ...string) (map[string][]byte, error)
- func (s *Driver) Set(items ...*kvv1.Item) error
- func (s *Driver) TTL(keys ...string) (map[string]string, error)
- type Plugin
- type PubSubDriver
- func (p *PubSubDriver) Connections(topic string, res map[string]struct{})
- func (p *PubSubDriver) Next() (*pubsub.Message, error)
- func (p *PubSubDriver) Publish(msg *pubsub.Message) error
- func (p *PubSubDriver) PublishAsync(msg *pubsub.Message)
- func (p *PubSubDriver) Subscribe(connectionID string, topics ...string) error
- func (p *PubSubDriver) Unsubscribe(connectionID string, topics ...string) error
Constants ¶
View Source
const PluginName string = "memory"
Variables ¶
This section is empty.
Functions ¶
func NewInMemoryDriver ¶
Types ¶
type Config ¶
type Config struct { // Interval for the check Interval int }
Config is default config for the in-memory driver
func (*Config) InitDefaults ¶
func (c *Config) InitDefaults()
InitDefaults by default driver is turned off
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
type PubSubDriver ¶
func (*PubSubDriver) Connections ¶
func (p *PubSubDriver) Connections(topic string, res map[string]struct{})
func (*PubSubDriver) PublishAsync ¶
func (p *PubSubDriver) PublishAsync(msg *pubsub.Message)
func (*PubSubDriver) Subscribe ¶
func (p *PubSubDriver) Subscribe(connectionID string, topics ...string) error
func (*PubSubDriver) Unsubscribe ¶
func (p *PubSubDriver) Unsubscribe(connectionID string, topics ...string) error
Click to show internal directories.
Click to hide internal directories.