Documentation
¶
Overview ¶
Package memory provides an in-memory implementation of the Bastion composite store. This is the default fallback when no persistent backend is configured.
Index ¶
- type Store
- func (s *Store) Allow(_ context.Context, key string, limit float64, burst int, _ time.Duration) (bool, error)
- func (s *Store) Close() error
- func (s *Store) Delete(_ context.Context, key string) error
- func (s *Store) DeleteRoute(_ context.Context, routeID string) error
- func (s *Store) DeleteState(_ context.Context, targetID string) error
- func (s *Store) Get(_ context.Context, key string) ([]byte, error)
- func (s *Store) GetHistory(_ context.Context, targetID string, limit int) ([]bastion.HealthCheckResult, error)
- func (s *Store) GetLatestState(_ context.Context, targetID string) (*bastion.HealthCheckResult, error)
- func (s *Store) GetRoute(_ context.Context, routeID string) (*bastion.Route, error)
- func (s *Store) GetState(_ context.Context, targetID string) (*bastion.CircuitBreakerSnapshot, error)
- func (s *Store) ListRoutes(_ context.Context) ([]*bastion.Route, error)
- func (s *Store) ListStates(_ context.Context) ([]*bastion.CircuitBreakerSnapshot, error)
- func (s *Store) Migrate(_ context.Context) error
- func (s *Store) Ping(_ context.Context) error
- func (s *Store) RecordCheck(_ context.Context, result *bastion.HealthCheckResult) error
- func (s *Store) SaveRoute(_ context.Context, route *bastion.Route) error
- func (s *Store) SaveState(_ context.Context, snap *bastion.CircuitBreakerSnapshot) error
- func (s *Store) Set(_ context.Context, key string, value []byte, ttl time.Duration) error
- func (s *Store) Write(_ context.Context, event *bastion.AuditEvent) error
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
}
Store is an in-memory implementation of the composite Bastion store.
func (*Store) GetHistory ¶
func (*Store) GetLatestState ¶
func (*Store) ListStates ¶
func (*Store) RecordCheck ¶
Click to show internal directories.
Click to hide internal directories.