reaper

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Component = &component.Component{
	Name: "cluster.reaper",
	Dependencies: component.Components{
		reaper.Component,
		repeater.Component,
		discovery.Component,
	},
	Init: component.StepFunc(func(container container.Container) error {
		return container.Provide(NewReaper)
	}),
	Execute: component.StepFunc(func(container container.Container) error {
		return container.Invoke(func(r repeater.Repeater, m cluster.Manager, reaperConfig reaper.Config, reaper *Reaper) error {
			m.OnAddPeer().Subscribe(reaper.onAddPeer)
			m.OnDeletingPeer().Subscribe(reaper.onDeletingPeer)

			return r.AddProcess(repeater.NewTask("cluster.reaper", reaperConfig.Delay, reaper.Process))
		})
	}),
}

Functions

This section is empty.

Types

type Reaper

type Reaper struct {
	// contains filtered or unexported fields
}

func NewReaper

func NewReaper(config *reaper.Config, m cluster.Manager, discoveryConfig *discovery.Config) *Reaper

func (*Reaper) Process

func (r *Reaper) Process(_ context.Context) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL