memdb

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemDb

type MemDb struct {
	// contains filtered or unexported fields
}

func NewMemDb

func NewMemDb(ex Storage, log *zap.Logger, interval time.Duration) (*MemDb, error)

func (*MemDb) GetKey

func (mdb *MemDb) GetKey(hash string) *key.ResponseKey

func (*MemDb) Listen

func (mdb *MemDb) Listen()

func (*MemDb) RemoveKey

func (mdb *MemDb) RemoveKey(k *key.ResponseKey)

func (*MemDb) SetKey

func (mdb *MemDb) SetKey(k *key.ResponseKey)

func (*MemDb) Stop

func (mdb *MemDb) Stop()

type ProviderSettingsMemDb added in v1.0.0

type ProviderSettingsMemDb struct {
	// contains filtered or unexported fields
}

func NewProviderSettingsMemDb added in v1.0.0

func NewProviderSettingsMemDb(ex ProviderSettingsStorage, log *zap.Logger, interval time.Duration) (*ProviderSettingsMemDb, error)

func (*ProviderSettingsMemDb) GetSetting added in v1.0.0

func (mdb *ProviderSettingsMemDb) GetSetting(k string) *provider.Setting

func (*ProviderSettingsMemDb) Listen added in v1.0.0

func (mdb *ProviderSettingsMemDb) Listen()

func (*ProviderSettingsMemDb) RemoveSetting added in v1.0.0

func (mdb *ProviderSettingsMemDb) RemoveSetting(k string)

func (*ProviderSettingsMemDb) SetSetting added in v1.0.0

func (mdb *ProviderSettingsMemDb) SetSetting(k string, v *provider.Setting)

func (*ProviderSettingsMemDb) Stop added in v1.0.0

func (mdb *ProviderSettingsMemDb) Stop()

type ProviderSettingsStorage added in v1.0.0

type ProviderSettingsStorage interface {
	GetAllProviderSettings() ([]*provider.Setting, error)
	GetUpdatedProviderSettings(interval time.Duration) ([]*provider.Setting, error)
}

type Storage

type Storage interface {
	GetAllKeys() ([]*key.ResponseKey, error)
	GetUpdatedKeys(interval time.Duration) ([]*key.ResponseKey, error)
}

Jump to

Keyboard shortcuts

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