Documentation
¶
Overview ¶
Package mongo provides a MongoDB implementation of the Bastion composite store using grove ORM.
Index ¶
- type Store
- func (s *Store) Allow(ctx context.Context, key string, limit float64, burst int, _ time.Duration) (bool, error)
- func (s *Store) Close() error
- func (s *Store) Delete(ctx context.Context, key string) error
- func (s *Store) DeleteRoute(ctx context.Context, routeID string) error
- func (s *Store) DeleteState(ctx context.Context, targetID string) error
- func (s *Store) Get(ctx context.Context, key string) ([]byte, error)
- func (s *Store) GetHistory(ctx context.Context, targetID string, limit int) ([]bastion.HealthCheckResult, error)
- func (s *Store) GetLatestState(ctx context.Context, targetID string) (*bastion.HealthCheckResult, error)
- func (s *Store) GetRoute(ctx context.Context, routeID string) (*bastion.Route, error)
- func (s *Store) GetState(ctx context.Context, targetID string) (*bastion.CircuitBreakerSnapshot, error)
- func (s *Store) ListRoutes(ctx context.Context) ([]*bastion.Route, error)
- func (s *Store) ListStates(ctx context.Context) ([]*bastion.CircuitBreakerSnapshot, error)
- func (s *Store) Migrate(ctx context.Context) error
- func (s *Store) Ping(ctx context.Context) error
- func (s *Store) RecordCheck(ctx context.Context, result *bastion.HealthCheckResult) error
- func (s *Store) SaveRoute(ctx context.Context, route *bastion.Route) error
- func (s *Store) SaveState(ctx context.Context, snap *bastion.CircuitBreakerSnapshot) error
- func (s *Store) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error
- func (s *Store) Write(ctx 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 implements store.Store using MongoDB via Grove ORM.
func (*Store) GetHistory ¶
func (*Store) GetLatestState ¶
func (*Store) ListRoutes ¶
func (*Store) ListStates ¶
func (*Store) RecordCheck ¶
Click to show internal directories.
Click to hide internal directories.