Documentation ¶
Overview ¶
Package housekeeping provides the housekeeping service. The housekeeping service is responsible for deactivating clients that have not been used for a long time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Interval is the time between housekeeping runs. Interval string `yaml:"Interval"` // CandidatesLimitPerProject is the maximum number of candidates to be returned per project. CandidatesLimitPerProject int `yaml:"CandidatesLimitPerProject"` // ProjectFetchSize is the maximum number of projects to be returned to deactivate candidates. ProjectFetchSize int `yaml:"HousekeepingProjectFetchSize"` }
Config is the configuration for the housekeeping service.
type Housekeeping ¶
type Housekeeping struct {
// contains filtered or unexported fields
}
Housekeeping is the housekeeping service. It periodically runs housekeeping tasks. It is responsible for deactivating clients that have not been active for a long time.
func New ¶
func New( conf *Config, database database.Database, coordinator sync.Coordinator, ) (*Housekeeping, error)
New creates a new housekeeping instance.
func Start ¶
func Start( conf *Config, database database.Database, coordinator sync.Coordinator, ) (*Housekeeping, error)
Start starts the housekeeping service.
func (*Housekeeping) FindDeactivateCandidates ¶ added in v0.4.13
func (h *Housekeeping) FindDeactivateCandidates( ctx context.Context, candidatesLimitPerProject int, projectFetchSize int, lastProjectID types.ID, ) (types.ID, []*database.ClientInfo, error)
FindDeactivateCandidates finds the housekeeping candidates.
func (*Housekeeping) Start ¶
func (h *Housekeeping) Start() error
Start starts the housekeeping service.
func (*Housekeeping) Stop ¶
func (h *Housekeeping) Stop() error
Stop stops the housekeeping service.
Click to show internal directories.
Click to hide internal directories.