Documentation
¶
Index ¶
Constants ¶
View Source
const ( UserIndexFilename = "user-index.json" UserIndexCompressedFilename = UserIndexFilename + ".gz" )
Variables ¶
View Source
var ( ErrIndexNotFound = errors.New("user index not found") ErrIndexCorrupted = errors.New("user index corrupted") )
Functions ¶
Types ¶
type Scanner ¶
type Scanner interface {
// ScanUsers returns the list of active, deleting and deleted users.
// Both deleting and deleted users are marked for deletion. The difference is that
// deleting users might still have data in the bucket, while deleted users don't.
ScanUsers(ctx context.Context) (active, deleting, deleted []string, err error)
}
func NewScanner ¶
func NewScanner(cfg tsdb.UsersScannerConfig, bkt objstore.InstrumentedBucket, logger log.Logger, reg prometheus.Registerer) (Scanner, error)
type UserIndex ¶
type UserIndex struct {
Version int `json:"version"`
UpdatedAt int64 `json:"updated_at"`
ActiveUsers []string `json:"active"`
DeletingUsers []string `json:"deleting"`
DeletedUsers []string `json:"deleted"`
}
func ReadUserIndex ¶
func (*UserIndex) GetUpdatedAt ¶
type UserIndexUpdater ¶
type UserIndexUpdater struct {
// contains filtered or unexported fields
}
func NewUserIndexUpdater ¶
func NewUserIndexUpdater(bkt objstore.InstrumentedBucket, scanner Scanner, reg prometheus.Registerer) *UserIndexUpdater
func (*UserIndexUpdater) UpdateUserIndex ¶
func (u *UserIndexUpdater) UpdateUserIndex(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.