memory

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func NewStore

func NewStore(config StoreConfig) *Store

func (*Store) CanFetchSecrets

func (s *Store) CanFetchSecrets(ctx context.Context, id core.GatewayID, secrets []string) (bool, error)

func (*Store) DeleteGateway

func (s *Store) DeleteGateway(ctx context.Context, id core.GatewayID) error

func (*Store) DeleteRoute

func (s *Store) DeleteRoute(ctx context.Context, id string) error

func (*Store) GatewayExists

func (s *Store) GatewayExists(ctx context.Context, id core.GatewayID) (bool, error)

func (*Store) GetGateway

func (s *Store) GetGateway(ctx context.Context, id core.GatewayID) (store.Gateway, error)

func (*Store) Sync

func (s *Store) Sync(ctx context.Context) error

func (*Store) SyncAtInterval added in v0.4.0

func (s *Store) SyncAtInterval(ctx context.Context)

SyncAtInterval syncs the objects in the store w/ Consul at a constant interval until the provided context is cancelled. Calling SyncAtInterval multiple times will only result in a single sync loop as it should only be called during startup.

func (*Store) UpsertGateway

func (s *Store) UpsertGateway(ctx context.Context, gateway store.Gateway) error

func (*Store) UpsertRoute

func (s *Store) UpsertRoute(ctx context.Context, route store.Route) error

type StoreConfig

type StoreConfig struct {
	Adapter core.SyncAdapter
	Logger  hclog.Logger
}

Jump to

Keyboard shortcuts

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