Documentation ¶
Index ¶
- func StartServer(port string, clientOptions ...option.ClientOption)
- type ReaperManager
- func (manager *ReaperManager) AddReaper(newReaper *reaper.Reaper)
- func (manager *ReaperManager) AddReaperFromConfig(newReaperConfig *reaperconfig.ReaperConfig)
- func (manager *ReaperManager) DeleteReaper(uuid string)
- func (manager *ReaperManager) GetReaper(uuid string) *reaper.Reaper
- func (manager *ReaperManager) ListReapers() []*reaper.Reaper
- func (manager *ReaperManager) MonitorReapers()
- func (manager *ReaperManager) Shutdown()
- func (manager *ReaperManager) UpdateReaper(config *reaperconfig.ReaperConfig)
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 ¶
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.