Versions in this module Expand all Collapse all v0 v0.2.0 May 26, 2026 Changes in this version + var ErrInvalidInput = errors.New("invalid maintenance input") + type CheckResult struct + Active bool + CheckedAt time.Time + Expired bool + State State + type DisableInput struct + Actor string + func NormalizeDisableInput(input DisableInput) (DisableInput, error) + type EnableInput struct + Actor string + CreatedAt time.Time + ExpiresAt *time.Time + Mode string + Reason string + type MemoryStore struct + func NewMemoryStore(opts ...MemoryStoreOption) *MemoryStore + func (s *MemoryStore) Check(ctx context.Context) (CheckResult, error) + func (s *MemoryStore) Disable(ctx context.Context, input DisableInput) (State, error) + func (s *MemoryStore) Enable(ctx context.Context, input EnableInput) (State, error) + func (s *MemoryStore) Read(ctx context.Context) (State, error) + type MemoryStoreOption func(*MemoryStore) + func WithClock(now func() time.Time) MemoryStoreOption + type SafeState struct + Actor string + ActorTruncated bool + CreatedAt time.Time + Enabled bool + ExpiresAt *time.Time + Mode string + Reason string + ReasonTruncated bool + type State struct + Actor string + CreatedAt time.Time + Enabled bool + ExpiresAt *time.Time + Mode string + Reason string + func CloneState(state State) State + func NormalizeEnableInput(input EnableInput, fallbackNow time.Time) (State, error) + func (s State) ActiveAt(now time.Time) bool + func (s State) ExpiredAt(now time.Time) bool + func (s State) SafeStatus() SafeState + type Store interface + Check func(context.Context) (CheckResult, error) + Disable func(context.Context, DisableInput) (State, error) + Enable func(context.Context, EnableInput) (State, error) + Read func(context.Context) (State, error)