Documentation
¶
Overview ¶
Package memory is the in-memory state store of ward. It implements the same store interfaces as the SQLite store and runs the same conformance suites. Its data lives as long as the value.
Index ¶
- type Store
- func (s *Store) AddResult(_ context.Context, r check.Result) (bool, error)
- func (s *Store) Close() error
- func (s *Store) Due(_ context.Context, name string, now time.Time) ([]mirror.Ref, time.Time, error)
- func (s *Store) FinishSeedCleanup(_ context.Context, name string, refs []string) error
- func (s *Store) HasMirror(_ context.Context, name string) (bool, error)
- func (s *Store) InsertLand(_ context.Context, l land.Land) error
- func (s *Store) Land(_ context.Context, id string) (land.Land, bool, error)
- func (s *Store) Lease(_ context.Context, repos []string, kid, leaseID string, now, until time.Time) (check.Request, bool, error)
- func (s *Store) Leased(_ context.Context, requestID, kid string) (bool, error)
- func (s *Store) MaxResultID(context.Context) (int64, error)
- func (s *Store) NextLands(_ context.Context, key land.Key, n int) ([]land.Land, error)
- func (s *Store) OpenRequest(_ context.Context, r check.Request) (check.Request, bool, error)
- func (s *Store) OpenRequests(context.Context) ([]check.Request, error)
- func (s *Store) Ping(context.Context) error
- func (s *Store) Reconciled(_ context.Context, name string, targets map[string]string, now time.Time) error
- func (s *Store) RecordFailure(_ context.Context, name, ref string, version int64, class mirror.Class, ...) error
- func (s *Store) RecordHook(_ context.Context, hit mirror.Hit, now time.Time) (mirror.HookResult, error)
- func (s *Store) RecordPage(_ context.Context, hits []mirror.Hit, cursor string, now time.Time) error
- func (s *Store) RecordPush(_ context.Context, name, ref string, version int64, pushed string, ...) error
- func (s *Store) Refs(_ context.Context, name, after string, limit int) ([]mirror.Ref, error)
- func (s *Store) RenewLease(_ context.Context, leaseID, kid string, repos []string, until time.Time) (bool, error)
- func (s *Store) Request(_ context.Context, id string) (check.Request, bool, error)
- func (s *Store) Results(_ context.Context, repo, tree, hash, env, keyBase string) ([]check.Result, error)
- func (s *Store) SaveLand(_ context.Context, l land.Land) error
- func (s *Store) Seed(_ context.Context, name string) (string, error)
- func (s *Store) SeedCleaned(_ context.Context, name string) (bool, error)
- func (s *Store) SeedRefs(_ context.Context, name string) (map[string]mirror.SeedRef, error)
- func (s *Store) Service(context.Context) (mirror.Service, error)
- func (s *Store) SetPushed(_ context.Context, name, ref, pushed string) error
- func (s *Store) SetSeed(_ context.Context, name, state string) error
- func (s *Store) SetSeedRef(_ context.Context, name, ref string, r mirror.SeedRef) error
- func (s *Store) SetSubscription(_ context.Context, id, cursor string, clearSeq bool) error
- func (s *Store) StateRefs(_ context.Context, name string) ([]string, error)
- func (s *Store) Stats(context.Context) ([]mirror.Stats, error)
- func (s *Store) Supersede(_ context.Context, old string, next check.Request, now time.Time) (bool, error)
- func (s *Store) UnfinishedKeys(context.Context) ([]land.Key, 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 keeps all state under one mutex, so each method is atomic as the interfaces require.