Documentation
¶
Overview ¶
Package protocol defines the information types required and expected when interacting with QED.
Index ¶
- func ToBalloonProof(mr *MembershipResult, hasherF func() hashing.Hasher) *balloon.MembershipProof
- func ToIncrementalProof(ir *IncrementalResponse, hasherF func() hashing.Hasher) *balloon.IncrementalProof
- type BackupInfo
- type BatchSnapshots
- type Event
- type EventsBulk
- type IncrementalRequest
- type IncrementalResponse
- type MembershipDigest
- type MembershipQuery
- type MembershipResult
- type NodeInfo
- type Scheme
- type ShardDetail
- type Shards
- type SignedSnapshot
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToBalloonProof ¶
func ToBalloonProof(mr *MembershipResult, hasherF func() hashing.Hasher) *balloon.MembershipProof
ToBaloonProof translate public protocol.MembershipResult to internal balloon.MembershipProof.
func ToIncrementalProof ¶
func ToIncrementalProof(ir *IncrementalResponse, hasherF func() hashing.Hasher) *balloon.IncrementalProof
ToIncrementalProof translate public protocol.IncrementalResponse to internal balloon.IncrementalProof.
Types ¶
type BackupInfo ¶
BackupInfo is the public struct used to parse the backup information. Metadata is suposed to contains only the balloon version.
type BatchSnapshots ¶
type BatchSnapshots struct {
Snapshots []*SignedSnapshot
}
BatchSnapshots is information structure that QED sends to Agents, and Agents to alerts/snapshot store. It is comprised of an array of Signed Snapshots.
func (*BatchSnapshots) Decode ¶
func (b *BatchSnapshots) Decode(msg []byte) error
func (*BatchSnapshots) Encode ¶
func (b *BatchSnapshots) Encode() ([]byte, error)
type Event ¶
type Event struct {
Event []byte
}
Event is the public struct that Add handler function uses to parse the post params.
type EventsBulk ¶
type EventsBulk struct {
Events [][]byte
}
EventBulk is the public struct that AddBulk handler function uses to parse the post params.
type IncrementalRequest ¶
IncrementalRequest is the information structure needed to ask for an incremental request.
type IncrementalResponse ¶
IncrementalResponse is the information structure expected from an incremental proof request.
func ToIncrementalResponse ¶
func ToIncrementalResponse(proof *balloon.IncrementalProof) *IncrementalResponse
ToIncrementalResponse translates internal api balloon.IncrementalProof to the public struct protocol.IncrementalResponse.
type MembershipDigest ¶
MembershipDigest is the public struct that apihttp.DigestMembership Handler uses to parse the post params.
type MembershipQuery ¶
MembershipQuery is the public struct that apihttp.Membership Handler uses to parse the post params.
type MembershipResult ¶
type MembershipResult struct { Exists bool Hyper map[string]hashing.Digest History map[string]hashing.Digest CurrentVersion uint64 QueryVersion uint64 ActualVersion uint64 KeyDigest hashing.Digest Key []byte }
MembershipResult is the information structure needed or a Membership proof.
func ToMembershipResult ¶
func ToMembershipResult(key []byte, mp *balloon.MembershipProof) *MembershipResult
ToMembershipProof translates internal api balloon.MembershipProof to the public struct protocol.MembershipResult.
type NodeInfo ¶
type NodeInfo struct { NodeId string `json:"node_id"` RaftAddr string `json:"raft_addr"` MgmtAddr string `json:"mgmt_addr"` HttpAddr string `json:"http_addr"` MetricsAddr string `json:"metrics_addr"` }
NodeInfo is the public struct that apihttp.InfoHandler call returns.
type ShardDetail ¶
ShardDetail is the information required to define a Shard.
type Shards ¶
type Shards struct { NodeId string `json:"nodeId"` LeaderId string `json:"leaderId"` URIScheme Scheme `json:"uriScheme"` Shards map[string]ShardDetail `json:"shards"` }
Shards is the public struct that apihttp.InfoShardsHandler call returns.
type SignedSnapshot ¶
SignedSnapshot is the public struct that apihttp.Add Handler call returns. It is comprised of a Snapshot and a signature.
func (*SignedSnapshot) Decode ¶
func (b *SignedSnapshot) Decode(msg []byte) error
func (*SignedSnapshot) Encode ¶
func (b *SignedSnapshot) Encode() ([]byte, error)