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 ¶
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.