Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Groups ¶
type Groups struct {
// contains filtered or unexported fields
}
Groups represents a collection of Keep groups in which the given client is a member.
func NewGroupRegistry ¶
func NewGroupRegistry( relayChain relaychain.GroupRegistrationInterface, persistence persistence.Handle, ) *Groups
NewGroupRegistry returns an empty GroupRegistry.
func (*Groups) GetGroup ¶
func (g *Groups) GetGroup(groupPublicKey []byte) []*Membership
GetGroup gets a group by a groupPublicKey
func (*Groups) LoadExistingGroups ¶
func (g *Groups) LoadExistingGroups()
LoadExistingGroups iterates over all stored memberships on disk and loads them into memory
func (*Groups) RegisterGroup ¶
func (g *Groups) RegisterGroup( signer *dkg.ThresholdSigner, channelName string, ) error
RegisterGroup registers that a group was successfully created by the given groupPublicKey.
func (*Groups) UnregisterStaleGroups ¶
func (g *Groups) UnregisterStaleGroups()
UnregisterStaleGroups lookup for groups that have been marked as stale on-chain. A stale group is a group that has expired and a certain time passed after the group expiration. This guarantees the group will not be selected to a new operation and it cannot have an ongoing operation for which it could be selected before it expired. Such a group can be safely removed from the registry and archived in the underlying storage.
type Membership ¶
type Membership struct { Signer *dkg.ThresholdSigner ChannelName string }
Membership represents a member of a group
func (*Membership) Marshal ¶
func (m *Membership) Marshal() ([]byte, error)
Marshal converts Membership to a byte array.
func (*Membership) Unmarshal ¶
func (m *Membership) Unmarshal(bytes []byte) error
Unmarshal converts a byte array produced by Marshal to Membership.