memdb

package
v1.28.4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomProvidersMemDb added in v1.3.0

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

func NewCustomProvidersMemDb added in v1.3.0

func NewCustomProvidersMemDb(ex CustomProvidersStorage, log *zap.Logger, interval time.Duration) (*CustomProvidersMemDb, error)

func (*CustomProvidersMemDb) GetProvider added in v1.3.0

func (mdb *CustomProvidersMemDb) GetProvider(name string) *custom.Provider

func (*CustomProvidersMemDb) GetRouteConfig added in v1.3.0

func (mdb *CustomProvidersMemDb) GetRouteConfig(name string, path string) *custom.RouteConfig

func (*CustomProvidersMemDb) Listen added in v1.3.0

func (mdb *CustomProvidersMemDb) Listen()

func (*CustomProvidersMemDb) SetProvider added in v1.3.0

func (mdb *CustomProvidersMemDb) SetProvider(provider *custom.Provider)

func (*CustomProvidersMemDb) Stop added in v1.3.0

func (mdb *CustomProvidersMemDb) Stop()

type CustomProvidersStorage added in v1.3.0

type CustomProvidersStorage interface {
	GetCustomProviders() ([]*custom.Provider, error)
	GetUpdatedCustomProviders(updatedAt int64) ([]*custom.Provider, error)
}

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 PoliciesStorage added in v1.13.0

type PoliciesStorage interface {
	GetAllPolicies() ([]*policy.Policy, error)
	GetUpdatedPolicies(updatedAt int64) ([]*policy.Policy, error)
}

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) GetSettings added in v1.7.0

func (mdb *ProviderSettingsMemDb) GetSettings(ks []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(s *provider.Setting)

func (*ProviderSettingsMemDb) Stop added in v1.0.0

func (mdb *ProviderSettingsMemDb) Stop()

type ProviderSettingsStorage added in v1.0.0

type ProviderSettingsStorage interface {
	GetProviderSettings(withSecret bool, ids []string) ([]*provider.Setting, error)
	GetUpdatedProviderSettings(updatedAt int64) ([]*provider.Setting, error)
}

type RoutesMemDb added in v1.7.0

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

func NewRoutesMemDb added in v1.7.0

func NewRoutesMemDb(ex RoutesStorage, ps PoliciesStorage, log *zap.Logger, interval time.Duration) (*RoutesMemDb, error)

func (*RoutesMemDb) GetPolicy added in v1.13.0

func (mdb *RoutesMemDb) GetPolicy(id string) *policy.Policy

func (*RoutesMemDb) GetRoute added in v1.7.0

func (mdb *RoutesMemDb) GetRoute(path string) *route.Route

func (*RoutesMemDb) Listen added in v1.7.0

func (mdb *RoutesMemDb) Listen()

func (*RoutesMemDb) SetPolicy added in v1.13.0

func (mdb *RoutesMemDb) SetPolicy(p *policy.Policy)

func (*RoutesMemDb) SetRoute added in v1.7.0

func (mdb *RoutesMemDb) SetRoute(r *route.Route)

func (*RoutesMemDb) Stop added in v1.7.0

func (mdb *RoutesMemDb) Stop()

type RoutesStorage added in v1.7.0

type RoutesStorage interface {
	GetRoutes() ([]*route.Route, error)
	GetUpdatedRoutes(updatedAt int64) ([]*route.Route, error)
}

type Storage

type Storage interface {
	GetAllKeys() ([]*key.ResponseKey, error)
	GetUpdatedKeys(updatedAt int64) ([]*key.ResponseKey, error)
}

Jump to

Keyboard shortcuts

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