 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var (
	ErrNotFound = errors.New("not found")
)
    Functions ¶
func NewMemoryBackend ¶ added in v0.5.0
func NewMemoryBackend() *memoryBackend
Types ¶
type Backend ¶ added in v0.5.0
type Backend interface {
	GetGateway(ctx context.Context, id core.GatewayID) ([]byte, error)
	ListGateways(ctx context.Context) ([][]byte, error)
	DeleteGateway(ctx context.Context, id core.GatewayID) error
	UpsertGateways(ctx context.Context, gateways ...GatewayRecord) error
	GetRoute(ctx context.Context, id string) ([]byte, error)
	ListRoutes(ctx context.Context) ([][]byte, error)
	DeleteRoute(ctx context.Context, id string) error
	UpsertRoutes(ctx context.Context, routes ...RouteRecord) error
}
    Backend is used for persisting and querying gateways and routes
type CompareResult ¶
type CompareResult int
type Config ¶ added in v0.5.0
type Config struct {
	Adapter       core.SyncAdapter
	Backend       Backend
	Binder        Binder
	Logger        hclog.Logger
	Marshaler     Marshaler
	StatusUpdater StatusUpdater
}
    type Gateway ¶
type Gateway interface {
	ID() core.GatewayID
	Resolve() core.ResolvedGateway
	CanFetchSecrets(secrets []string) (bool, error)
}
    Gateway describes a gateway.
type GatewayRecord ¶ added in v0.5.0
GatewayRecord represents a serialized Gateway
type Route ¶
type Route interface {
	ID() string
}
    Route should be implemented by all route source integrations
type RouteRecord ¶ added in v0.5.0
RouteRecord represents a serialized Route
type StatusUpdater ¶ added in v0.5.0
type Store ¶
type Store interface {
	ReadStore
	WriteStore
}
    Store is used for persisting and querying gateways and routes
type WriteStore ¶ added in v0.5.0
type WriteStore interface {
	UpsertGateway(ctx context.Context, gateway Gateway, updateConditionFn func(current Gateway) bool) error
	DeleteGateway(ctx context.Context, id core.GatewayID) error
	UpsertRoute(ctx context.Context, route Route, updateConditionFn func(current Route) bool) error
	DeleteRoute(ctx context.Context, id string) error
	SyncAllAtInterval(ctx context.Context)
}
     Click to show internal directories. 
   Click to hide internal directories.