Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lease ¶
type Lease struct {
// contains filtered or unexported fields
}
Lease specifies the peer that is the active Observer in the cluster
func (*Lease) IsLocalPeerOwner ¶
IsLocalPeerOwner returns true if the local peer is the owner of this lease
type Provider ¶
Provider is a lease provider
func NewProvider ¶
NewProvider returns a new lease provider
func (*Provider) CreateLease ¶
CreateLease creates a lease for the given block number. If the peer is not operating in clustered mode then the local peer is always the lease owner. In clustered-mode, the owner of the lease is chosen from all peers with either the sidetree-observer or sidetree-observer-standby role, where the sidetree-observer role is given priority. If there are multiple peers with the same role then the peer is deterministically chosen from these peers based on the given block number so that each peer in the cluster resolves to the same peer.