Documentation ¶
Overview ¶
Package implements reliable messaging layer for parties identified by a URL.
Index ¶
- Constants
- type Ack
- type AddressedMessage
- type Backfill
- type BackfillAbort
- type BackfillComplete
- type BackfillRequest
- type BackfillStart
- type DeviceInvite
- type EncryptedBody
- type EndpointInfo
- type Group
- type GroupAcks
- type GroupDescription
- type GroupMembership
- type GroupMessage
- type GroupMessageBody
- type GroupUpdate
- type IdentityMap
- type IncomingGroupMessage
- type IntroFailed
- type IntroSucceeded
- type IntroUpdate
- type Jpake1
- type LWWBlob
- type LWWString
- type LostBody
- type Manager
- func (m *Manager) AddMembership(groupID, identityID, membershipID ids.ID, membership *Membership) error
- func (m *Manager) AddressedMessageFromDirectMessage(message *directMessage, dme []*directMessageEndpoint) (*AddressedMessage, error)
- func (m *Manager) ApplyProposal(groupID, applierIdentityID, applierMembershipID, proposedMembershipID ids.ID, ...) error
- func (m *Manager) ApproveJpakeInvite(jpake1 *Jpake1, password string) (ids.ID, error)
- func (m *Manager) ApproveJpakeInviteWithID(jpake1 *Jpake1, password string, existingGroupID *ids.ID) (ids.ID, error)
- func (m *Manager) CancelInvites(groupID ids.ID) error
- func (m *Manager) CreateGroup(name string) (ids.ID, error)
- func (m *Manager) CreateGroupWithID(name string, id ids.ID) error
- func (m *Manager) DeviceGroupID() ids.ID
- func (m *Manager) EndpointInfoForURL(u string) (*EndpointInfo, error)
- func (m *Manager) Group(id ids.ID) (*Group, error)
- func (m *Manager) GroupMembers(groupID ids.ID) (GroupMembership, error)
- func (m *Manager) GroupState(id ids.ID) (*GroupUpdate, error)
- func (m *Manager) Groups() ([]*Group, error)
- func (m *Manager) InitiatePrekeySessions() error
- func (m *Manager) InviteMember(groupID ids.ID, password string) (*Jpake1, error)
- func (m *Manager) ProcessIncomingMessage(from string, body []byte) error
- func (m *Manager) ProposeMembership(groupID, identityID, otherMembershipID ids.ID, otherMembership *Membership) (ids.ID, *Membership, error)
- func (m *Manager) ReportChange(groupID ids.ID, url string, active bool) error
- func (m *Manager) SendGroupMessage(groupID ids.ID, body []byte) error
- func (m *Manager) Shutdown() (err error)
- func (m *Manager) Start() error
- func (m *Manager) Updates() UpdateChannel
- func (m *Manager) WaitForDelivery() error
- type Member
- type Membership
- type MembershipDescription
- type MembershipMap
- type MembershipUpdater
- type PrivateMessage
- type RepairBody
- type Transports
- type UpdateChannel
- type ZKPBody
Constants ¶
View Source
const ( // group states GroupStateNew = 0 GroupStateBackfilling = 1 GroupStateSynced = 2 GroupStateProposed = 3 // group membership connection states GroupMembershipConnectionStateNew = 0 GroupMembershipConnectionStateInitiating = 1 GroupMembershipConnectionStateConnected = 2 GroupMembershipConnectionStateDeactivating = 3 GroupMembershipConnectionStateDeactivated = 4 // group membership backfill states GroupMembershipBackfillStateNew = 0 GroupMembershipBackfillStateBackfilling = 1 GroupMembershipBackfillStateSynced = 2 // bundle member states MessageStateUndelivered = 0 MessageStateDelivered = 1 // endpoint states EndpointStateReady = 0 EndpointStateDelivering = 1 EndpointStateNotReady = 2 EndpointStateDelivered = 3 EndpointStateFailed = 4 EndpointStatePreflightFailed = 5 IntroTypeJpake = 0 IntroTypePrekey = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressedMessage ¶
type BackfillAbort ¶
type BackfillComplete ¶
type BackfillRequest ¶
type BackfillStart ¶
type DeviceInvite ¶
type EncryptedBody ¶
type EndpointInfo ¶
type EndpointInfo struct {
Priority uint8 `bencode:"p"`
}
type GroupDescription ¶
type GroupDescription struct { Name *LWWString `bencode:"n"` Description *LWWString `bencode:"d"` Icon *LWWBlob `bencode:"ic"` IconType *LWWString `bencode:"it"` Identities IdentityMap `bencode:"i"` }
type GroupMembership ¶
type GroupMembership []*Member
type GroupMessage ¶
type GroupMessage struct { GroupMessages []*GroupMessageBody `bencode:"b"` GroupAckSeq uint64 `bencode:"gs"` GroupAckSparse []byte `bencode:"gss"` PrivateAckSeq uint64 `bencode:"ps"` PrivateAckSparse []byte `bencode:"pss"` BaseDigest []byte `bencode:"bd"` GroupChanges []byte `bencode:"gc"` NewDigest []byte `bencode:"nd"` PrivateMessages []*PrivateMessage `bencode:"m"` Lost []*LostBody `bencode:"l"` }
type GroupMessageBody ¶
type GroupUpdate ¶
type IdentityMap ¶
type IdentityMap map[ids.ID]MembershipMap
type IncomingGroupMessage ¶
type IntroUpdate ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(config *config.Config, db *db.Database, t Transports, s sender, p processor, c clock.Clock, mu MembershipUpdater) (*Manager, error)
func (*Manager) AddMembership ¶
func (m *Manager) AddMembership(groupID, identityID, membershipID ids.ID, membership *Membership) error
func (*Manager) AddressedMessageFromDirectMessage ¶
func (m *Manager) AddressedMessageFromDirectMessage(message *directMessage, dme []*directMessageEndpoint) (*AddressedMessage, error)
func (*Manager) ApplyProposal ¶
func (m *Manager) ApplyProposal(groupID, applierIdentityID, applierMembershipID, proposedMembershipID ids.ID, proposedMembership *Membership) error
func (*Manager) ApproveJpakeInvite ¶
func (*Manager) ApproveJpakeInviteWithID ¶
func (*Manager) CreateGroupWithID ¶
func (*Manager) DeviceGroupID ¶
func (*Manager) EndpointInfoForURL ¶
func (m *Manager) EndpointInfoForURL(u string) (*EndpointInfo, error)
func (*Manager) GroupMembers ¶
func (m *Manager) GroupMembers(groupID ids.ID) (GroupMembership, error)
func (*Manager) GroupState ¶
func (m *Manager) GroupState(id ids.ID) (*GroupUpdate, error)
func (*Manager) InitiatePrekeySessions ¶
func (*Manager) InviteMember ¶
func (*Manager) ProcessIncomingMessage ¶
func (*Manager) ProposeMembership ¶
func (m *Manager) ProposeMembership(groupID, identityID, otherMembershipID ids.ID, otherMembership *Membership) (ids.ID, *Membership, error)
func (*Manager) ReportChange ¶
func (*Manager) SendGroupMessage ¶
func (*Manager) Updates ¶
func (m *Manager) Updates() UpdateChannel
func (*Manager) WaitForDelivery ¶
type Membership ¶
type Membership struct { Description *MembershipDescription `bencode:"d"` Signature []byte `bencode:"s"` }
type MembershipDescription ¶
type MembershipDescription struct { IntroKey [32]byte `bencode:"k"` Version uint32 `bencode:"v"` Protocol uint32 `bencode:"p"` Endpoints map[string]*EndpointInfo `bencode:"es"` }
type MembershipMap ¶
type MembershipMap map[ids.ID]*Membership
type MembershipUpdater ¶
type PrivateMessage ¶
type RepairBody ¶
type Transports ¶
type UpdateChannel ¶
type UpdateChannel chan interface{}
Click to show internal directories.
Click to hide internal directories.