Documentation ¶
Index ¶
- func AliveMessageToString(am *gossip.AliveMessage) string
- func DataDigestToString(dig *gossip.DataDigest) string
- func DataRequestToString(dataReq *gossip.DataRequest) string
- func DataUpdateToString(du *gossip.DataUpdate) string
- func GetPullMsgType(m *gossip.GossipMessage) gossip.PullMsgType
- func InternalEndpoint(s *gossip.SecretEnvelope) string
- func IsAck(m *gossip.GossipMessage) bool
- func IsAliveMsg(m *gossip.GossipMessage) bool
- func IsChannelRestricted(m *gossip.GossipMessage) bool
- func IsDataMsg(m *gossip.GossipMessage) bool
- func IsDataReq(m *gossip.GossipMessage) bool
- func IsDataUpdate(m *gossip.GossipMessage) bool
- func IsDigestMsg(m *gossip.GossipMessage) bool
- func IsHelloMsg(m *gossip.GossipMessage) bool
- func IsIdentityMsg(m *gossip.GossipMessage) bool
- func IsLeadershipMsg(m *gossip.GossipMessage) bool
- func IsOrgRestricted(m *gossip.GossipMessage) bool
- func IsPrivateDataMsg(m *gossip.GossipMessage) bool
- func IsPullMsg(m *gossip.GossipMessage) bool
- func IsRemoteStateMessage(m *gossip.GossipMessage) bool
- func IsStateInfoMsg(m *gossip.GossipMessage) bool
- func IsStateInfoPullRequestMsg(m *gossip.GossipMessage) bool
- func IsStateInfoSnapshot(m *gossip.GossipMessage) bool
- func IsTagLegal(m *gossip.GossipMessage) error
- func LeadershipMessageToString(lm *gossip.LeadershipMessage) string
- func MemberToString(m *gossip.Member) string
- func MembershipRequestToString(mr *gossip.MembershipRequest) string
- func MembershipResponseToString(mr *gossip.MembershipResponse) string
- func PayloadToString(p *gossip.Payload) string
- func RemovePvtDataResponseToString(res *gossip.RemotePvtDataResponse) string
- func SignSecret(e *gossip.Envelope, signer Signer, secret *gossip.Secret) error
- func StateInfoPullRequestToString(sipr *gossip.StateInfoPullRequest) string
- func StateInfoSnapshotToString(sis *gossip.StateInfoSnapshot) string
- func StateInfoToString(si *gossip.StateInfo) string
- type SignedGossipMessage
- type Signer
- type Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AliveMessageToString ¶
func AliveMessageToString(am *gossip.AliveMessage) string
AliveMessageToString of AliveMessage prints Alive Message, Identity and Timestamp
func DataDigestToString ¶
func DataDigestToString(dig *gossip.DataDigest) string
DataDigestToString prints nonce, msg_type and digests
func DataRequestToString ¶
func DataRequestToString(dataReq *gossip.DataRequest) string
DataRequestToString prints nonce, msg_type and digests
func DataUpdateToString ¶
func DataUpdateToString(du *gossip.DataUpdate) string
DataUpdateToString prints Type, items and nonce
func GetPullMsgType ¶
func GetPullMsgType(m *gossip.GossipMessage) gossip.PullMsgType
GetPullMsgType returns the phase of the pull mechanism this GossipMessage belongs to for example: Hello, Digest, etc. If this isn't a pull message, PullMsgType_UNDEFINED is returned.
func InternalEndpoint ¶
func InternalEndpoint(s *gossip.SecretEnvelope) string
InternalEndpoint returns the internal endpoint in the secret envelope, or an empty string if a failure occurs.
func IsAck ¶
func IsAck(m *gossip.GossipMessage) bool
IsAck returns whether this GossipMessage is an acknowledgement
func IsAliveMsg ¶
func IsAliveMsg(m *gossip.GossipMessage) bool
IsAliveMsg returns whether this GossipMessage is an AliveMessage
func IsChannelRestricted ¶
func IsChannelRestricted(m *gossip.GossipMessage) bool
IsChannelRestricted returns whether this GossipMessage should be routed only in its channel
func IsDataMsg ¶
func IsDataMsg(m *gossip.GossipMessage) bool
IsDataMsg returns whether this GossipMessage is a data message
func IsDataReq ¶
func IsDataReq(m *gossip.GossipMessage) bool
IsDataReq returns whether this GossipMessage is a data request message
func IsDataUpdate ¶
func IsDataUpdate(m *gossip.GossipMessage) bool
IsDataUpdate returns whether this GossipMessage is a data update message
func IsDigestMsg ¶
func IsDigestMsg(m *gossip.GossipMessage) bool
IsDigestMsg returns whether this GossipMessage is a digest message
func IsHelloMsg ¶
func IsHelloMsg(m *gossip.GossipMessage) bool
IsHelloMsg returns whether this GossipMessage is a hello message
func IsIdentityMsg ¶
func IsIdentityMsg(m *gossip.GossipMessage) bool
IsIdentityMsg returns whether this GossipMessage is an identity message
func IsLeadershipMsg ¶
func IsLeadershipMsg(m *gossip.GossipMessage) bool
IsLeadershipMsg returns whether this GossipMessage is a leadership (leader election) message
func IsOrgRestricted ¶
func IsOrgRestricted(m *gossip.GossipMessage) bool
IsOrgRestricted returns whether this GossipMessage should be routed only inside the organization
func IsPrivateDataMsg ¶
func IsPrivateDataMsg(m *gossip.GossipMessage) bool
IsPrivateDataMsg returns whether this message is related to private data
func IsPullMsg ¶
func IsPullMsg(m *gossip.GossipMessage) bool
IsPullMsg returns whether this GossipMessage is a message that belongs to the pull mechanism
func IsRemoteStateMessage ¶
func IsRemoteStateMessage(m *gossip.GossipMessage) bool
IsRemoteStateMessage returns whether this GossipMessage is related to state synchronization
func IsStateInfoMsg ¶
func IsStateInfoMsg(m *gossip.GossipMessage) bool
IsStateInfoMsg returns whether this GossipMessage is a stateInfo message
func IsStateInfoPullRequestMsg ¶
func IsStateInfoPullRequestMsg(m *gossip.GossipMessage) bool
IsStateInfoPullRequestMsg returns whether this GossipMessage is a stateInfoPullRequest
func IsStateInfoSnapshot ¶
func IsStateInfoSnapshot(m *gossip.GossipMessage) bool
IsStateInfoSnapshot returns whether this GossipMessage is a stateInfo snapshot
func IsTagLegal ¶
func IsTagLegal(m *gossip.GossipMessage) error
IsTagLegal checks the GossipMessage tags and inner type and returns an error if the tag doesn't match the type.
func LeadershipMessageToString ¶
func LeadershipMessageToString(lm *gossip.LeadershipMessage) string
LeadershipMessageToString prints PKI-id, Timestamp and Is Declaration
func MemberToString ¶
MemberToString prints Endpoint and PKI-id
func MembershipRequestToString ¶
func MembershipRequestToString(mr *gossip.MembershipRequest) string
MembershipRequestToString prints self information
func MembershipResponseToString ¶
func MembershipResponseToString(mr *gossip.MembershipResponse) string
MembershipResponseToString of MembershipResponse prints number of Alive and number of Dead
func PayloadToString ¶
PayloadToString prints Block message: Data and seq
func RemovePvtDataResponseToString ¶
func RemovePvtDataResponseToString(res *gossip.RemotePvtDataResponse) string
RemovePvtDataResponseToString returns a string representation of this RemotePvtDataResponse
func SignSecret ¶
SignSecret signs the secret payload and creates a secret envelope out of it.
func StateInfoPullRequestToString ¶
func StateInfoPullRequestToString(sipr *gossip.StateInfoPullRequest) string
StateInfoPullRequestToString prints Channel MAC
func StateInfoSnapshotToString ¶
func StateInfoSnapshotToString(sis *gossip.StateInfoSnapshot) string
StateInfoSnapshotToString prints items
func StateInfoToString ¶
StateInfoToString prints Timestamp and PKI-id
Types ¶
type SignedGossipMessage ¶
type SignedGossipMessage struct { *gossip.Envelope *gossip.GossipMessage }
SignedGossipMessage contains a GossipMessage and the Envelope from which it came from
func EnvelopeToGossipMessage ¶
func EnvelopeToGossipMessage(e *gossip.Envelope) (*SignedGossipMessage, error)
EnvelopeToGossipMessage un-marshals a given envelope and creates a SignedGossipMessage out of it. Returns an error if un-marshaling fails.
func NoopSign ¶
func NoopSign(m *gossip.GossipMessage) (*SignedGossipMessage, error)
NoopSign creates a SignedGossipMessage with a nil signature
func (*SignedGossipMessage) IsSigned ¶
func (m *SignedGossipMessage) IsSigned() bool
IsSigned returns whether the message has a signature in the envelope.
func (*SignedGossipMessage) Sign ¶
func (m *SignedGossipMessage) Sign(signer Signer) (*gossip.Envelope, error)
Sign signs a GossipMessage with given Signer. Returns an Envelope on success, panics on failure.
func (*SignedGossipMessage) String ¶
func (m *SignedGossipMessage) String() string
String returns a string representation of a SignedGossipMessage