raftlease

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Facade

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

Facade allows for modification of the underlying raft instance from a controller facade.

func NewFacade

func NewFacade(auth facade.Authorizer, raft facade.RaftContext) (*Facade, error)

NewFacade create a Facade from just the required dependencies.

func NewFacadeV1

func NewFacadeV1(context facade.Context) (*Facade, error)

NewFacade create a facade for handling raft leases.

func (*Facade) ApplyLease

func (facade *Facade) ApplyLease(ctx context.Context, args params.LeaseOperations) (params.ErrorResults, error)

ApplyLease is a bulk API to allow applying lease operations to a raft context. If the current controller is not the leader, then a NotLeaderError is returned. Information about where they can locate the leader maybe supplied in the error message, but isn't guaranteed. If no information is supplied, it is expected that the client performs their own algorithm to locate the leader (roundrobin or listen to the apidetails topic).

type RaftLeaseV1

type RaftLeaseV1 interface {
	ApplyLease(args params.LeaseOperations) (params.ErrorResults, error)
}

RaftLeaseV1 informs users of the API, what is contained in Facade version 1.

Jump to

Keyboard shortcuts

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