manager

package
v0.0.0-...-60cae77 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServer

func StartServer(port string, clientOptions ...option.ClientOption)

StartServer starts the gRPC server listing on the given address and port.

Types

type ReaperManager

type ReaperManager struct {
	Reapers []*reaper.Reaper
	// contains filtered or unexported fields
}

ReaperManager is a controller for all running reapers.

func NewReaperManager

func NewReaperManager(ctx context.Context, clientOptions ...option.ClientOption) *ReaperManager

NewReaperManager creates a new reaper manager.

func (*ReaperManager) AddReaper

func (manager *ReaperManager) AddReaper(newReaper *reaper.Reaper)

AddReaper adds a reaper to the manager.

func (*ReaperManager) AddReaperFromConfig

func (manager *ReaperManager) AddReaperFromConfig(newReaperConfig *reaperconfig.ReaperConfig)

AddReaperFromConfig adds a reaper to the manager from a ReaperConfig.

func (*ReaperManager) DeleteReaper

func (manager *ReaperManager) DeleteReaper(uuid string)

DeleteReaper sends a signal to delete a reaper with the given UUID.

func (*ReaperManager) GetReaper

func (manager *ReaperManager) GetReaper(uuid string) *reaper.Reaper

GetReaper returns the reaper with the given UUID, or returns nil if no such reaper exists.

func (*ReaperManager) ListReapers

func (manager *ReaperManager) ListReapers() []*reaper.Reaper

ListReapers returns a list of reapers being managed by the ReaperManager.

func (*ReaperManager) MonitorReapers

func (manager *ReaperManager) MonitorReapers()

MonitorReapers is the controller for all running reapers. It continuously cycles between all running reapers to run a sweep. The method also checks whether a new reaper has been added to the manager, or if the the manager should be stopped. Note that MonitorReapers should be called in a separate goroutine.

func (*ReaperManager) Shutdown

func (manager *ReaperManager) Shutdown()

Shutdown ends the reaper manager process.

func (*ReaperManager) UpdateReaper

func (manager *ReaperManager) UpdateReaper(config *reaperconfig.ReaperConfig)

UpdateReaper sends a signal to update a reaper with UUID given in the config.

Jump to

Keyboard shortcuts

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