Documentation
¶
Index ¶
- func CurrentSchemaVersion() int
- type Store
- func (s *Store) AdminStorageSnapshot(ctx context.Context) (storage.AdminStorageSnapshot, error)
- func (s *Store) AnalyzeStatsTables(ctx context.Context) error
- func (s *Store) Close() error
- func (s *Store) CountAuditLog(ctx context.Context, query storage.AuditQuery) (int64, error)
- func (s *Store) CountWSConnectionSessions(ctx context.Context) (int64, error)
- func (s *Store) GetWSConnectionSessionByID(ctx context.Context, id int64) (*storage.WSConnectionSession, error)
- func (s *Store) HasAuditDuplicate(ctx context.Context, e storage.AuditEntry) (bool, error)
- func (s *Store) HasWSConnectionSession(ctx context.Context, connID string, startedUnix int64) (bool, error)
- func (s *Store) ListDistinctAuditKinds(ctx context.Context, scanLimit int) ([]int, error)
- func (s *Store) PurgeAuditLog(ctx context.Context, olderThanUnix int64) (int64, error)
- func (s *Store) PurgeRelayMetricBucketsBefore(ctx context.Context, cutoffStartUnixExclusive int64) (int64, error)
- func (s *Store) PurgeWSConnectionSessionsBefore(ctx context.Context, olderThanUnix int64) (int64, error)
- func (s *Store) QueryAuditLog(ctx context.Context, query storage.AuditQuery) ([]storage.AuditEntry, error)
- func (s *Store) QueryConfigChangelog(ctx context.Context, limit int) ([]storage.ConfigChange, error)
- func (s *Store) QueryRelayMetricBuckets(ctx context.Context, q storage.RelayMetricBucketQuery) ([]storage.RelayMetricBucket, error)
- func (s *Store) QueryWSConnectionSessions(ctx context.Context, q storage.WSConnectionSessionQuery) ([]storage.WSConnectionSession, error)
- func (s *Store) SaveAuditEntry(ctx context.Context, e storage.AuditEntry) error
- func (s *Store) SaveConfigChange(ctx context.Context, c storage.ConfigChange) error
- func (s *Store) SaveWSConnectionSession(ctx context.Context, e storage.WSConnectionSession) (int64, error)
- func (s *Store) UpsertRelayMetricBucket(ctx context.Context, b storage.RelayMetricBucket) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentSchemaVersion ¶
func CurrentSchemaVersion() int
CurrentSchemaVersion is the PRAGMA user_version / app-expected value for this binary.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a local meta database with a single-writer queue and a read pool.
func (*Store) AdminStorageSnapshot ¶
AdminStorageSnapshot returns audit row count and on-disk bytes for the meta database.
func (*Store) AnalyzeStatsTables ¶
AnalyzeStatsTables refreshes sqlite_stat1 for tables used by the admin storage snapshot.
func (*Store) CountAuditLog ¶
func (*Store) CountWSConnectionSessions ¶
func (*Store) GetWSConnectionSessionByID ¶
func (*Store) HasAuditDuplicate ¶
func (*Store) HasWSConnectionSession ¶
func (*Store) ListDistinctAuditKinds ¶
func (*Store) PurgeAuditLog ¶
func (*Store) PurgeRelayMetricBucketsBefore ¶
func (*Store) PurgeWSConnectionSessionsBefore ¶
func (*Store) QueryAuditLog ¶
func (s *Store) QueryAuditLog(ctx context.Context, query storage.AuditQuery) ([]storage.AuditEntry, error)
func (*Store) QueryConfigChangelog ¶
func (*Store) QueryRelayMetricBuckets ¶
func (s *Store) QueryRelayMetricBuckets(ctx context.Context, q storage.RelayMetricBucketQuery) ([]storage.RelayMetricBucket, error)
func (*Store) QueryWSConnectionSessions ¶
func (s *Store) QueryWSConnectionSessions(ctx context.Context, q storage.WSConnectionSessionQuery) ([]storage.WSConnectionSession, error)
func (*Store) SaveAuditEntry ¶
func (*Store) SaveConfigChange ¶
func (*Store) SaveWSConnectionSession ¶
func (*Store) UpsertRelayMetricBucket ¶
Click to show internal directories.
Click to hide internal directories.