leadership

package
v0.0.0-...-84dfa8d Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: AGPL-3.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

Types

type LeadershipService

type LeadershipService interface {

	// ClaimLeadership makes a leadership claim with the given parameters.
	ClaimLeadership(ctx context.Context, params params.ClaimLeadershipBulkParams) (params.ClaimLeadershipBulkResults, error)

	// BlockUntilLeadershipReleased blocks the caller until leadership is
	// released for the given service.
	BlockUntilLeadershipReleased(ctx context.Context, ApplicationTag names.ApplicationTag) (params.ErrorResult, error)
}

LeadershipService implements a variant of leadership.Claimer for consumption over the API.

func NewLeadershipService

func NewLeadershipService(
	claimer leadership.Claimer, authorizer facade.Authorizer,
) (LeadershipService, error)

NewLeadershipService constructs a new LeadershipService.

Jump to

Keyboard shortcuts

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