Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
func New ¶
func New(store LeaseStore, logger *slog.Logger, metrics Metrics, jobs []Job, cfg Config) (*Coordinator, error)
func (*Coordinator) Done ¶
func (c *Coordinator) Done() <-chan struct{}
func (*Coordinator) Run ¶
func (c *Coordinator) Run(ctx context.Context)
type LeaseStore ¶
type LeaseStore interface {
TryAcquireMaintenanceLease(context.Context, string, uuid.UUID, time.Duration) (store.MaintenanceLease, bool, error)
RenewMaintenanceLease(context.Context, store.MaintenanceLease, time.Duration) (store.MaintenanceLease, bool, error)
ReleaseMaintenanceLease(context.Context, store.MaintenanceLease) (bool, error)
RunMaintenanceBatch(context.Context, store.MaintenanceLease, func(context.Context) (int64, bool, error)) (int64, bool, bool, error)
}
Click to show internal directories.
Click to hide internal directories.