Documentation ¶
Index ¶
- Variables
- func RegisterGossipServer(s *grpc.Server, srv GossipServer)
- type Acknowledgement
- type AliveMessage
- func (*AliveMessage) Descriptor() ([]byte, []int)deprecated
- func (x *AliveMessage) GetIdentity() []byte
- func (x *AliveMessage) GetMembership() *Membership
- func (x *AliveMessage) GetTimestamp() *PeerTime
- func (*AliveMessage) ProtoMessage()
- func (x *AliveMessage) ProtoReflect() protoreflect.Message
- func (x *AliveMessage) Reset()
- func (x *AliveMessage) String() string
- type Chaincode
- func (*Chaincode) Descriptor() ([]byte, []int)deprecated
- func (x *Chaincode) GetMetadata() []byte
- func (x *Chaincode) GetName() string
- func (x *Chaincode) GetVersion() string
- func (*Chaincode) ProtoMessage()
- func (x *Chaincode) ProtoReflect() protoreflect.Message
- func (x *Chaincode) Reset()
- func (x *Chaincode) String() string
- type ConnEstablish
- func (*ConnEstablish) Descriptor() ([]byte, []int)deprecated
- func (x *ConnEstablish) GetIdentity() []byte
- func (x *ConnEstablish) GetPkiId() []byte
- func (x *ConnEstablish) GetProbe() bool
- func (x *ConnEstablish) GetTlsCertHash() []byte
- func (*ConnEstablish) ProtoMessage()
- func (x *ConnEstablish) ProtoReflect() protoreflect.Message
- func (x *ConnEstablish) Reset()
- func (x *ConnEstablish) String() string
- type DataDigest
- func (*DataDigest) Descriptor() ([]byte, []int)deprecated
- func (x *DataDigest) GetDigests() [][]byte
- func (x *DataDigest) GetMsgType() PullMsgType
- func (x *DataDigest) GetNonce() uint64
- func (*DataDigest) ProtoMessage()
- func (x *DataDigest) ProtoReflect() protoreflect.Message
- func (x *DataDigest) Reset()
- func (x *DataDigest) String() string
- type DataMessage
- type DataRequest
- func (*DataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DataRequest) GetDigests() [][]byte
- func (x *DataRequest) GetMsgType() PullMsgType
- func (x *DataRequest) GetNonce() uint64
- func (*DataRequest) ProtoMessage()
- func (x *DataRequest) ProtoReflect() protoreflect.Message
- func (x *DataRequest) Reset()
- func (x *DataRequest) String() string
- type DataUpdate
- func (*DataUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *DataUpdate) GetData() []*Envelope
- func (x *DataUpdate) GetMsgType() PullMsgType
- func (x *DataUpdate) GetNonce() uint64
- func (*DataUpdate) ProtoMessage()
- func (x *DataUpdate) ProtoReflect() protoreflect.Message
- func (x *DataUpdate) Reset()
- func (x *DataUpdate) String() string
- type Empty
- type Envelope
- func (*Envelope) Descriptor() ([]byte, []int)deprecated
- func (x *Envelope) GetPayload() []byte
- func (x *Envelope) GetSecretEnvelope() *SecretEnvelope
- func (x *Envelope) GetSignature() []byte
- func (*Envelope) ProtoMessage()
- func (x *Envelope) ProtoReflect() protoreflect.Message
- func (x *Envelope) Reset()
- func (x *Envelope) String() string
- type GossipClient
- type GossipHello
- func (*GossipHello) Descriptor() ([]byte, []int)deprecated
- func (x *GossipHello) GetMetadata() []byte
- func (x *GossipHello) GetMsgType() PullMsgType
- func (x *GossipHello) GetNonce() uint64
- func (*GossipHello) ProtoMessage()
- func (x *GossipHello) ProtoReflect() protoreflect.Message
- func (x *GossipHello) Reset()
- func (x *GossipHello) String() string
- type GossipMessage
- func (*GossipMessage) Descriptor() ([]byte, []int)deprecated
- func (x *GossipMessage) GetAck() *Acknowledgement
- func (x *GossipMessage) GetAliveMsg() *AliveMessage
- func (x *GossipMessage) GetChannel() []byte
- func (x *GossipMessage) GetConn() *ConnEstablish
- func (m *GossipMessage) GetContent() isGossipMessage_Content
- func (x *GossipMessage) GetDataDig() *DataDigest
- func (x *GossipMessage) GetDataMsg() *DataMessage
- func (x *GossipMessage) GetDataReq() *DataRequest
- func (x *GossipMessage) GetDataUpdate() *DataUpdate
- func (x *GossipMessage) GetEmpty() *Empty
- func (x *GossipMessage) GetHello() *GossipHello
- func (x *GossipMessage) GetLeadershipMsg() *LeadershipMessage
- func (x *GossipMessage) GetMemReq() *MembershipRequest
- func (x *GossipMessage) GetMemRes() *MembershipResponse
- func (x *GossipMessage) GetNonce() uint64
- func (x *GossipMessage) GetPeerIdentity() *PeerIdentity
- func (x *GossipMessage) GetPrivateData() *PrivateDataMessage
- func (x *GossipMessage) GetPrivateReq() *RemotePvtDataRequest
- func (x *GossipMessage) GetPrivateRes() *RemotePvtDataResponse
- func (x *GossipMessage) GetStateInfo() *StateInfo
- func (x *GossipMessage) GetStateInfoPullReq() *StateInfoPullRequest
- func (x *GossipMessage) GetStateRequest() *RemoteStateRequest
- func (x *GossipMessage) GetStateResponse() *RemoteStateResponse
- func (x *GossipMessage) GetStateSnapshot() *StateInfoSnapshot
- func (x *GossipMessage) GetTag() GossipMessage_Tag
- func (*GossipMessage) ProtoMessage()
- func (x *GossipMessage) ProtoReflect() protoreflect.Message
- func (x *GossipMessage) Reset()
- func (x *GossipMessage) String() string
- type GossipMessage_Ack
- type GossipMessage_AliveMsg
- type GossipMessage_Conn
- type GossipMessage_DataDig
- type GossipMessage_DataMsg
- type GossipMessage_DataReq
- type GossipMessage_DataUpdate
- type GossipMessage_Empty
- type GossipMessage_Hello
- type GossipMessage_LeadershipMsg
- type GossipMessage_MemReq
- type GossipMessage_MemRes
- type GossipMessage_PeerIdentity
- type GossipMessage_PrivateData
- type GossipMessage_PrivateReq
- type GossipMessage_PrivateRes
- type GossipMessage_StateInfo
- type GossipMessage_StateInfoPullReq
- type GossipMessage_StateRequest
- type GossipMessage_StateResponse
- type GossipMessage_StateSnapshot
- type GossipMessage_Tag
- func (GossipMessage_Tag) Descriptor() protoreflect.EnumDescriptor
- func (x GossipMessage_Tag) Enum() *GossipMessage_Tag
- func (GossipMessage_Tag) EnumDescriptor() ([]byte, []int)deprecated
- func (x GossipMessage_Tag) Number() protoreflect.EnumNumber
- func (x GossipMessage_Tag) String() string
- func (GossipMessage_Tag) Type() protoreflect.EnumType
- type GossipServer
- type Gossip_GossipStreamClient
- type Gossip_GossipStreamServer
- type LeadershipMessage
- func (*LeadershipMessage) Descriptor() ([]byte, []int)deprecated
- func (x *LeadershipMessage) GetIsDeclaration() bool
- func (x *LeadershipMessage) GetPkiId() []byte
- func (x *LeadershipMessage) GetTimestamp() *PeerTime
- func (*LeadershipMessage) ProtoMessage()
- func (x *LeadershipMessage) ProtoReflect() protoreflect.Message
- func (x *LeadershipMessage) Reset()
- func (x *LeadershipMessage) String() string
- type Membership
- func (*Membership) Descriptor() ([]byte, []int)deprecated
- func (x *Membership) GetEndpoint() string
- func (x *Membership) GetMetadata() []byte
- func (x *Membership) GetPkiId() []byte
- func (*Membership) ProtoMessage()
- func (x *Membership) ProtoReflect() protoreflect.Message
- func (x *Membership) Reset()
- func (x *Membership) String() string
- type MembershipRequest
- func (*MembershipRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MembershipRequest) GetKnown() [][]byte
- func (x *MembershipRequest) GetSelfInformation() *Envelope
- func (*MembershipRequest) ProtoMessage()
- func (x *MembershipRequest) ProtoReflect() protoreflect.Message
- func (x *MembershipRequest) Reset()
- func (x *MembershipRequest) String() string
- type MembershipResponse
- func (*MembershipResponse) Descriptor() ([]byte, []int)deprecated
- func (x *MembershipResponse) GetAlive() []*Envelope
- func (x *MembershipResponse) GetDead() []*Envelope
- func (x *MembershipResponse) GetEndpoint() string
- func (x *MembershipResponse) GetPkiId() []byte
- func (*MembershipResponse) ProtoMessage()
- func (x *MembershipResponse) ProtoReflect() protoreflect.Message
- func (x *MembershipResponse) Reset()
- func (x *MembershipResponse) String() string
- type Payload
- func (*Payload) Descriptor() ([]byte, []int)deprecated
- func (x *Payload) GetData() []byte
- func (x *Payload) GetPrivateData() [][]byte
- func (x *Payload) GetSeqNum() uint64
- func (*Payload) ProtoMessage()
- func (x *Payload) ProtoReflect() protoreflect.Message
- func (x *Payload) Reset()
- func (x *Payload) String() string
- type PeerIdentity
- func (*PeerIdentity) Descriptor() ([]byte, []int)deprecated
- func (x *PeerIdentity) GetCert() []byte
- func (x *PeerIdentity) GetMetadata() []byte
- func (x *PeerIdentity) GetPkiId() []byte
- func (*PeerIdentity) ProtoMessage()
- func (x *PeerIdentity) ProtoReflect() protoreflect.Message
- func (x *PeerIdentity) Reset()
- func (x *PeerIdentity) String() string
- type PeerTime
- type PrivateDataMessage
- func (*PrivateDataMessage) Descriptor() ([]byte, []int)deprecated
- func (x *PrivateDataMessage) GetPayload() *PrivatePayload
- func (*PrivateDataMessage) ProtoMessage()
- func (x *PrivateDataMessage) ProtoReflect() protoreflect.Message
- func (x *PrivateDataMessage) Reset()
- func (x *PrivateDataMessage) String() string
- type PrivatePayload
- func (*PrivatePayload) Descriptor() ([]byte, []int)deprecated
- func (x *PrivatePayload) GetCollectionName() string
- func (x *PrivatePayload) GetNamespace() string
- func (x *PrivatePayload) GetPrivateRwset() []byte
- func (x *PrivatePayload) GetPrivateSimHeight() uint64
- func (x *PrivatePayload) GetTxId() string
- func (*PrivatePayload) ProtoMessage()
- func (x *PrivatePayload) ProtoReflect() protoreflect.Message
- func (x *PrivatePayload) Reset()
- func (x *PrivatePayload) String() string
- type Properties
- func (*Properties) Descriptor() ([]byte, []int)deprecated
- func (x *Properties) GetChaincodes() []*Chaincode
- func (x *Properties) GetLedgerHeight() uint64
- func (x *Properties) GetLeftChannel() bool
- func (*Properties) ProtoMessage()
- func (x *Properties) ProtoReflect() protoreflect.Message
- func (x *Properties) Reset()
- func (x *Properties) String() string
- type PullMsgType
- func (PullMsgType) Descriptor() protoreflect.EnumDescriptor
- func (x PullMsgType) Enum() *PullMsgType
- func (PullMsgType) EnumDescriptor() ([]byte, []int)deprecated
- func (x PullMsgType) Number() protoreflect.EnumNumber
- func (x PullMsgType) String() string
- func (PullMsgType) Type() protoreflect.EnumType
- type PvtDataDigest
- func (*PvtDataDigest) Descriptor() ([]byte, []int)deprecated
- func (x *PvtDataDigest) GetBlockSeq() uint64
- func (x *PvtDataDigest) GetCollection() string
- func (x *PvtDataDigest) GetNamespace() string
- func (x *PvtDataDigest) GetSeqInBlock() uint64
- func (x *PvtDataDigest) GetTxId() string
- func (*PvtDataDigest) ProtoMessage()
- func (x *PvtDataDigest) ProtoReflect() protoreflect.Message
- func (x *PvtDataDigest) Reset()
- func (x *PvtDataDigest) String() string
- type PvtDataElement
- func (*PvtDataElement) Descriptor() ([]byte, []int)deprecated
- func (x *PvtDataElement) GetDigest() *PvtDataDigest
- func (x *PvtDataElement) GetPayload() [][]byte
- func (*PvtDataElement) ProtoMessage()
- func (x *PvtDataElement) ProtoReflect() protoreflect.Message
- func (x *PvtDataElement) Reset()
- func (x *PvtDataElement) String() string
- type RemotePvtDataRequest
- func (*RemotePvtDataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemotePvtDataRequest) GetDigests() []*PvtDataDigest
- func (*RemotePvtDataRequest) ProtoMessage()
- func (x *RemotePvtDataRequest) ProtoReflect() protoreflect.Message
- func (x *RemotePvtDataRequest) Reset()
- func (x *RemotePvtDataRequest) String() string
- type RemotePvtDataResponse
- func (*RemotePvtDataResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RemotePvtDataResponse) GetElements() []*PvtDataElement
- func (*RemotePvtDataResponse) ProtoMessage()
- func (x *RemotePvtDataResponse) ProtoReflect() protoreflect.Message
- func (x *RemotePvtDataResponse) Reset()
- func (x *RemotePvtDataResponse) String() string
- type RemoteStateRequest
- func (*RemoteStateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoteStateRequest) GetEndSeqNum() uint64
- func (x *RemoteStateRequest) GetStartSeqNum() uint64
- func (*RemoteStateRequest) ProtoMessage()
- func (x *RemoteStateRequest) ProtoReflect() protoreflect.Message
- func (x *RemoteStateRequest) Reset()
- func (x *RemoteStateRequest) String() string
- type RemoteStateResponse
- func (*RemoteStateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RemoteStateResponse) GetPayloads() []*Payload
- func (*RemoteStateResponse) ProtoMessage()
- func (x *RemoteStateResponse) ProtoReflect() protoreflect.Message
- func (x *RemoteStateResponse) Reset()
- func (x *RemoteStateResponse) String() string
- type Secret
- type SecretEnvelope
- func (*SecretEnvelope) Descriptor() ([]byte, []int)deprecated
- func (x *SecretEnvelope) GetPayload() []byte
- func (x *SecretEnvelope) GetSignature() []byte
- func (*SecretEnvelope) ProtoMessage()
- func (x *SecretEnvelope) ProtoReflect() protoreflect.Message
- func (x *SecretEnvelope) Reset()
- func (x *SecretEnvelope) String() string
- type StateInfo
- func (*StateInfo) Descriptor() ([]byte, []int)deprecated
- func (x *StateInfo) GetChannel_MAC() []byte
- func (x *StateInfo) GetPkiId() []byte
- func (x *StateInfo) GetProperties() *Properties
- func (x *StateInfo) GetTimestamp() *PeerTime
- func (*StateInfo) ProtoMessage()
- func (x *StateInfo) ProtoReflect() protoreflect.Message
- func (x *StateInfo) Reset()
- func (x *StateInfo) String() string
- type StateInfoPullRequest
- func (*StateInfoPullRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StateInfoPullRequest) GetChannel_MAC() []byte
- func (*StateInfoPullRequest) ProtoMessage()
- func (x *StateInfoPullRequest) ProtoReflect() protoreflect.Message
- func (x *StateInfoPullRequest) Reset()
- func (x *StateInfoPullRequest) String() string
- type StateInfoSnapshot
- func (*StateInfoSnapshot) Descriptor() ([]byte, []int)deprecated
- func (x *StateInfoSnapshot) GetElements() []*Envelope
- func (*StateInfoSnapshot) ProtoMessage()
- func (x *StateInfoSnapshot) ProtoReflect() protoreflect.Message
- func (x *StateInfoSnapshot) Reset()
- func (x *StateInfoSnapshot) String() string
- type UnimplementedGossipServer
Constants ¶
This section is empty.
Variables ¶
var ( PullMsgType_name = map[int32]string{ 0: "UNDEFINED", 1: "BLOCK_MSG", 2: "IDENTITY_MSG", } PullMsgType_value = map[string]int32{ "UNDEFINED": 0, "BLOCK_MSG": 1, "IDENTITY_MSG": 2, } )
Enum value maps for PullMsgType.
var ( GossipMessage_Tag_name = map[int32]string{ 0: "UNDEFINED", 1: "EMPTY", 2: "ORG_ONLY", 3: "CHAN_ONLY", 4: "CHAN_AND_ORG", 5: "CHAN_OR_ORG", } GossipMessage_Tag_value = map[string]int32{ "UNDEFINED": 0, "EMPTY": 1, "ORG_ONLY": 2, "CHAN_ONLY": 3, "CHAN_AND_ORG": 4, "CHAN_OR_ORG": 5, } )
Enum value maps for GossipMessage_Tag.
var File_message_proto protoreflect.FileDescriptor
Functions ¶
func RegisterGossipServer ¶
func RegisterGossipServer(s *grpc.Server, srv GossipServer)
Types ¶
type Acknowledgement ¶
type Acknowledgement struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*Acknowledgement) Descriptor
deprecated
func (*Acknowledgement) Descriptor() ([]byte, []int)
Deprecated: Use Acknowledgement.ProtoReflect.Descriptor instead.
func (*Acknowledgement) GetError ¶
func (x *Acknowledgement) GetError() string
func (*Acknowledgement) ProtoMessage ¶
func (*Acknowledgement) ProtoMessage()
func (*Acknowledgement) ProtoReflect ¶
func (x *Acknowledgement) ProtoReflect() protoreflect.Message
func (*Acknowledgement) Reset ¶
func (x *Acknowledgement) Reset()
func (*Acknowledgement) String ¶
func (x *Acknowledgement) String() string
type AliveMessage ¶
type AliveMessage struct { Membership *Membership `protobuf:"bytes,1,opt,name=membership,proto3" json:"membership,omitempty"` Timestamp *PeerTime `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Identity: proto.Marshal(*pbmsp.SerializedIdentity) Identity []byte `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` // contains filtered or unexported fields }
func (*AliveMessage) Descriptor
deprecated
func (*AliveMessage) Descriptor() ([]byte, []int)
Deprecated: Use AliveMessage.ProtoReflect.Descriptor instead.
func (*AliveMessage) GetIdentity ¶
func (x *AliveMessage) GetIdentity() []byte
func (*AliveMessage) GetMembership ¶
func (x *AliveMessage) GetMembership() *Membership
func (*AliveMessage) GetTimestamp ¶
func (x *AliveMessage) GetTimestamp() *PeerTime
func (*AliveMessage) ProtoMessage ¶
func (*AliveMessage) ProtoMessage()
func (*AliveMessage) ProtoReflect ¶
func (x *AliveMessage) ProtoReflect() protoreflect.Message
func (*AliveMessage) Reset ¶
func (x *AliveMessage) Reset()
func (*AliveMessage) String ¶
func (x *AliveMessage) String() string
type Chaincode ¶
type Chaincode struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
func (*Chaincode) Descriptor
deprecated
func (*Chaincode) GetMetadata ¶
func (*Chaincode) GetVersion ¶
func (*Chaincode) ProtoMessage ¶
func (*Chaincode) ProtoMessage()
func (*Chaincode) ProtoReflect ¶
func (x *Chaincode) ProtoReflect() protoreflect.Message
type ConnEstablish ¶
type ConnEstablish struct { PkiId []byte `protobuf:"bytes,1,opt,name=pki_id,json=pkiId,proto3" json:"pki_id,omitempty"` Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` TlsCertHash []byte `protobuf:"bytes,3,opt,name=tls_cert_hash,json=tlsCertHash,proto3" json:"tls_cert_hash,omitempty"` Probe bool `protobuf:"varint,4,opt,name=probe,proto3" json:"probe,omitempty"` // contains filtered or unexported fields }
ConnEstablish 用于两个 peer 节点之间通过握手建立连接,握手时用于相互之间证明各自的身份。
func (*ConnEstablish) Descriptor
deprecated
func (*ConnEstablish) Descriptor() ([]byte, []int)
Deprecated: Use ConnEstablish.ProtoReflect.Descriptor instead.
func (*ConnEstablish) GetIdentity ¶
func (x *ConnEstablish) GetIdentity() []byte
func (*ConnEstablish) GetPkiId ¶
func (x *ConnEstablish) GetPkiId() []byte
func (*ConnEstablish) GetProbe ¶
func (x *ConnEstablish) GetProbe() bool
func (*ConnEstablish) GetTlsCertHash ¶
func (x *ConnEstablish) GetTlsCertHash() []byte
func (*ConnEstablish) ProtoMessage ¶
func (*ConnEstablish) ProtoMessage()
func (*ConnEstablish) ProtoReflect ¶
func (x *ConnEstablish) ProtoReflect() protoreflect.Message
func (*ConnEstablish) Reset ¶
func (x *ConnEstablish) Reset()
func (*ConnEstablish) String ¶
func (x *ConnEstablish) String() string
type DataDigest ¶
type DataDigest struct { Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Digests [][]byte `protobuf:"bytes,2,rep,name=digests,proto3" json:"digests,omitempty"` MsgType PullMsgType `protobuf:"varint,3,opt,name=msg_type,json=msgType,proto3,enum=pbgossip.PullMsgType" json:"msg_type,omitempty"` // contains filtered or unexported fields }
func (*DataDigest) Descriptor
deprecated
func (*DataDigest) Descriptor() ([]byte, []int)
Deprecated: Use DataDigest.ProtoReflect.Descriptor instead.
func (*DataDigest) GetDigests ¶
func (x *DataDigest) GetDigests() [][]byte
func (*DataDigest) GetMsgType ¶
func (x *DataDigest) GetMsgType() PullMsgType
func (*DataDigest) GetNonce ¶
func (x *DataDigest) GetNonce() uint64
func (*DataDigest) ProtoMessage ¶
func (*DataDigest) ProtoMessage()
func (*DataDigest) ProtoReflect ¶
func (x *DataDigest) ProtoReflect() protoreflect.Message
func (*DataDigest) Reset ¶
func (x *DataDigest) Reset()
func (*DataDigest) String ¶
func (x *DataDigest) String() string
type DataMessage ¶
type DataMessage struct { Payload *Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
DataMessage 是一个包含区块的消息。
func (*DataMessage) Descriptor
deprecated
func (*DataMessage) Descriptor() ([]byte, []int)
Deprecated: Use DataMessage.ProtoReflect.Descriptor instead.
func (*DataMessage) GetPayload ¶
func (x *DataMessage) GetPayload() *Payload
func (*DataMessage) ProtoMessage ¶
func (*DataMessage) ProtoMessage()
func (*DataMessage) ProtoReflect ¶
func (x *DataMessage) ProtoReflect() protoreflect.Message
func (*DataMessage) Reset ¶
func (x *DataMessage) Reset()
func (*DataMessage) String ¶
func (x *DataMessage) String() string
type DataRequest ¶
type DataRequest struct { Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Digests [][]byte `protobuf:"bytes,2,rep,name=digests,proto3" json:"digests,omitempty"` MsgType PullMsgType `protobuf:"varint,3,opt,name=msg_type,json=msgType,proto3,enum=pbgossip.PullMsgType" json:"msg_type,omitempty"` // contains filtered or unexported fields }
DataRequest 用于向远程节点请求特定区块。
func (*DataRequest) Descriptor
deprecated
func (*DataRequest) Descriptor() ([]byte, []int)
Deprecated: Use DataRequest.ProtoReflect.Descriptor instead.
func (*DataRequest) GetDigests ¶
func (x *DataRequest) GetDigests() [][]byte
func (*DataRequest) GetMsgType ¶
func (x *DataRequest) GetMsgType() PullMsgType
func (*DataRequest) GetNonce ¶
func (x *DataRequest) GetNonce() uint64
func (*DataRequest) ProtoMessage ¶
func (*DataRequest) ProtoMessage()
func (*DataRequest) ProtoReflect ¶
func (x *DataRequest) ProtoReflect() protoreflect.Message
func (*DataRequest) Reset ¶
func (x *DataRequest) Reset()
func (*DataRequest) String ¶
func (x *DataRequest) String() string
type DataUpdate ¶
type DataUpdate struct { Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Data []*Envelope `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` MsgType PullMsgType `protobuf:"varint,3,opt,name=msg_type,json=msgType,proto3,enum=pbgossip.PullMsgType" json:"msg_type,omitempty"` // contains filtered or unexported fields }
DataUpdate 是 pull 阶段的最后一条信息,由接收方发送给发起方
func (*DataUpdate) Descriptor
deprecated
func (*DataUpdate) Descriptor() ([]byte, []int)
Deprecated: Use DataUpdate.ProtoReflect.Descriptor instead.
func (*DataUpdate) GetData ¶
func (x *DataUpdate) GetData() []*Envelope
func (*DataUpdate) GetMsgType ¶
func (x *DataUpdate) GetMsgType() PullMsgType
func (*DataUpdate) GetNonce ¶
func (x *DataUpdate) GetNonce() uint64
func (*DataUpdate) ProtoMessage ¶
func (*DataUpdate) ProtoMessage()
func (*DataUpdate) ProtoReflect ¶
func (x *DataUpdate) ProtoReflect() protoreflect.Message
func (*DataUpdate) Reset ¶
func (x *DataUpdate) Reset()
func (*DataUpdate) String ¶
func (x *DataUpdate) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
Empty 用于 ping。
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Envelope ¶
type Envelope struct { // Payload: proto.Marshal(*GossipMessage) Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // Signature: sign(Payload) Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` SecretEnvelope *SecretEnvelope `protobuf:"bytes,3,opt,name=secret_envelope,json=secretEnvelope,proto3" json:"secret_envelope,omitempty"` // contains filtered or unexported fields }
func (*Envelope) Descriptor
deprecated
func (*Envelope) GetPayload ¶
func (*Envelope) GetSecretEnvelope ¶
func (x *Envelope) GetSecretEnvelope() *SecretEnvelope
func (*Envelope) GetSignature ¶
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
func (*Envelope) ProtoReflect ¶
func (x *Envelope) ProtoReflect() protoreflect.Message
type GossipClient ¶
type GossipClient interface { GossipStream(ctx context.Context, opts ...grpc.CallOption) (Gossip_GossipStreamClient, error) Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) }
GossipClient is the client API for Gossip service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGossipClient ¶
func NewGossipClient(cc grpc.ClientConnInterface) GossipClient
type GossipHello ¶
type GossipHello struct { Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Metadata []byte `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` MsgType PullMsgType `protobuf:"varint,3,opt,name=msg_type,json=msgType,proto3,enum=pbgossip.PullMsgType" json:"msg_type,omitempty"` // contains filtered or unexported fields }
func (*GossipHello) Descriptor
deprecated
func (*GossipHello) Descriptor() ([]byte, []int)
Deprecated: Use GossipHello.ProtoReflect.Descriptor instead.
func (*GossipHello) GetMetadata ¶
func (x *GossipHello) GetMetadata() []byte
func (*GossipHello) GetMsgType ¶
func (x *GossipHello) GetMsgType() PullMsgType
func (*GossipHello) GetNonce ¶
func (x *GossipHello) GetNonce() uint64
func (*GossipHello) ProtoMessage ¶
func (*GossipHello) ProtoMessage()
func (*GossipHello) ProtoReflect ¶
func (x *GossipHello) ProtoReflect() protoreflect.Message
func (*GossipHello) Reset ¶
func (x *GossipHello) Reset()
func (*GossipHello) String ¶
func (x *GossipHello) String() string
type GossipMessage ¶
type GossipMessage struct { // Nonce 用于测试 Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Channel []byte `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"` // Tag 决定允许将报文转发给哪些 peer 节点。 Tag GossipMessage_Tag `protobuf:"varint,3,opt,name=tag,proto3,enum=pbgossip.GossipMessage_Tag" json:"tag,omitempty"` // Types that are assignable to Content: // // *GossipMessage_AliveMsg // *GossipMessage_MemReq // *GossipMessage_MemRes // *GossipMessage_DataMsg // *GossipMessage_Hello // *GossipMessage_DataDig // *GossipMessage_DataReq // *GossipMessage_DataUpdate // *GossipMessage_Empty // *GossipMessage_Conn // *GossipMessage_StateInfo // *GossipMessage_StateSnapshot // *GossipMessage_StateInfoPullReq // *GossipMessage_StateRequest // *GossipMessage_StateResponse // *GossipMessage_LeadershipMsg // *GossipMessage_PeerIdentity // *GossipMessage_Ack // *GossipMessage_PrivateReq // *GossipMessage_PrivateRes // *GossipMessage_PrivateData Content isGossipMessage_Content `protobuf_oneof:"content"` // contains filtered or unexported fields }
func (*GossipMessage) Descriptor
deprecated
func (*GossipMessage) Descriptor() ([]byte, []int)
Deprecated: Use GossipMessage.ProtoReflect.Descriptor instead.
func (*GossipMessage) GetAck ¶
func (x *GossipMessage) GetAck() *Acknowledgement
func (*GossipMessage) GetAliveMsg ¶
func (x *GossipMessage) GetAliveMsg() *AliveMessage
func (*GossipMessage) GetChannel ¶
func (x *GossipMessage) GetChannel() []byte
func (*GossipMessage) GetConn ¶
func (x *GossipMessage) GetConn() *ConnEstablish
func (*GossipMessage) GetContent ¶
func (m *GossipMessage) GetContent() isGossipMessage_Content
func (*GossipMessage) GetDataDig ¶
func (x *GossipMessage) GetDataDig() *DataDigest
func (*GossipMessage) GetDataMsg ¶
func (x *GossipMessage) GetDataMsg() *DataMessage
func (*GossipMessage) GetDataReq ¶
func (x *GossipMessage) GetDataReq() *DataRequest
func (*GossipMessage) GetDataUpdate ¶
func (x *GossipMessage) GetDataUpdate() *DataUpdate
func (*GossipMessage) GetEmpty ¶
func (x *GossipMessage) GetEmpty() *Empty
func (*GossipMessage) GetHello ¶
func (x *GossipMessage) GetHello() *GossipHello
func (*GossipMessage) GetLeadershipMsg ¶
func (x *GossipMessage) GetLeadershipMsg() *LeadershipMessage
func (*GossipMessage) GetMemReq ¶
func (x *GossipMessage) GetMemReq() *MembershipRequest
func (*GossipMessage) GetMemRes ¶
func (x *GossipMessage) GetMemRes() *MembershipResponse
func (*GossipMessage) GetNonce ¶
func (x *GossipMessage) GetNonce() uint64
func (*GossipMessage) GetPeerIdentity ¶
func (x *GossipMessage) GetPeerIdentity() *PeerIdentity
func (*GossipMessage) GetPrivateData ¶
func (x *GossipMessage) GetPrivateData() *PrivateDataMessage
func (*GossipMessage) GetPrivateReq ¶
func (x *GossipMessage) GetPrivateReq() *RemotePvtDataRequest
func (*GossipMessage) GetPrivateRes ¶
func (x *GossipMessage) GetPrivateRes() *RemotePvtDataResponse
func (*GossipMessage) GetStateInfo ¶
func (x *GossipMessage) GetStateInfo() *StateInfo
func (*GossipMessage) GetStateInfoPullReq ¶
func (x *GossipMessage) GetStateInfoPullReq() *StateInfoPullRequest
func (*GossipMessage) GetStateRequest ¶
func (x *GossipMessage) GetStateRequest() *RemoteStateRequest
func (*GossipMessage) GetStateResponse ¶
func (x *GossipMessage) GetStateResponse() *RemoteStateResponse
func (*GossipMessage) GetStateSnapshot ¶
func (x *GossipMessage) GetStateSnapshot() *StateInfoSnapshot
func (*GossipMessage) GetTag ¶
func (x *GossipMessage) GetTag() GossipMessage_Tag
func (*GossipMessage) ProtoMessage ¶
func (*GossipMessage) ProtoMessage()
func (*GossipMessage) ProtoReflect ¶
func (x *GossipMessage) ProtoReflect() protoreflect.Message
func (*GossipMessage) Reset ¶
func (x *GossipMessage) Reset()
func (*GossipMessage) String ¶
func (x *GossipMessage) String() string
type GossipMessage_Ack ¶
type GossipMessage_Ack struct {
Ack *Acknowledgement `protobuf:"bytes,21,opt,name=ack,proto3,oneof"`
}
type GossipMessage_AliveMsg ¶
type GossipMessage_AliveMsg struct {
AliveMsg *AliveMessage `protobuf:"bytes,4,opt,name=alive_msg,json=aliveMsg,proto3,oneof"`
}
type GossipMessage_Conn ¶
type GossipMessage_Conn struct { // 用于建立连接的消息。 Conn *ConnEstablish `protobuf:"bytes,13,opt,name=conn,proto3,oneof"` }
type GossipMessage_DataDig ¶
type GossipMessage_DataDig struct {
DataDig *DataDigest `protobuf:"bytes,9,opt,name=data_dig,json=dataDig,proto3,oneof"`
}
type GossipMessage_DataMsg ¶
type GossipMessage_DataMsg struct { // 账本区块 DataMsg *DataMessage `protobuf:"bytes,7,opt,name=data_msg,json=dataMsg,proto3,oneof"` }
type GossipMessage_DataReq ¶
type GossipMessage_DataReq struct {
DataReq *DataRequest `protobuf:"bytes,10,opt,name=data_req,json=dataReq,proto3,oneof"`
}
type GossipMessage_DataUpdate ¶
type GossipMessage_DataUpdate struct {
DataUpdate *DataUpdate `protobuf:"bytes,11,opt,name=data_update,json=dataUpdate,proto3,oneof"`
}
type GossipMessage_Empty ¶
type GossipMessage_Empty struct { // 空消息,用于 ping。 Empty *Empty `protobuf:"bytes,12,opt,name=empty,proto3,oneof"` }
type GossipMessage_Hello ¶
type GossipMessage_Hello struct { // push / pull Hello *GossipHello `protobuf:"bytes,8,opt,name=hello,proto3,oneof"` }
type GossipMessage_LeadershipMsg ¶
type GossipMessage_LeadershipMsg struct { // LeadershipMessage 在领导者选举期间发送,以通知远程同伴同伴宣布自己为领导者的意图。 LeadershipMsg *LeadershipMessage `protobuf:"bytes,19,opt,name=leadership_msg,json=leadershipMsg,proto3,oneof"` }
type GossipMessage_MemReq ¶
type GossipMessage_MemReq struct {
MemReq *MembershipRequest `protobuf:"bytes,5,opt,name=mem_req,json=memReq,proto3,oneof"`
}
type GossipMessage_MemRes ¶
type GossipMessage_MemRes struct {
MemRes *MembershipResponse `protobuf:"bytes,6,opt,name=mem_res,json=memRes,proto3,oneof"`
}
type GossipMessage_PeerIdentity ¶
type GossipMessage_PeerIdentity struct { // PeerIdentity 用于了解其他 peer 节点的证书。 PeerIdentity *PeerIdentity `protobuf:"bytes,20,opt,name=peer_identity,json=peerIdentity,proto3,oneof"` }
type GossipMessage_PrivateData ¶
type GossipMessage_PrivateData struct { // 封装私人数据,用于在背书后分发私人 rwset。 PrivateData *PrivateDataMessage `protobuf:"bytes,24,opt,name=private_data,json=privateData,proto3,oneof"` }
type GossipMessage_PrivateReq ¶
type GossipMessage_PrivateReq struct { // 用于请求秘密信息。 PrivateReq *RemotePvtDataRequest `protobuf:"bytes,22,opt,name=private_req,json=privateReq,proto3,oneof"` }
type GossipMessage_PrivateRes ¶
type GossipMessage_PrivateRes struct { // 用于回复 RemotePvtDataRequest 请求。 PrivateRes *RemotePvtDataResponse `protobuf:"bytes,23,opt,name=private_res,json=privateRes,proto3,oneof"` }
type GossipMessage_StateInfo ¶
type GossipMessage_StateInfo struct { // 用于传递状态消息。 StateInfo *StateInfo `protobuf:"bytes,14,opt,name=state_info,json=stateInfo,proto3,oneof"` }
type GossipMessage_StateInfoPullReq ¶
type GossipMessage_StateInfoPullReq struct {
StateInfoPullReq *StateInfoPullRequest `protobuf:"bytes,16,opt,name=state_info_pull_req,json=stateInfoPullReq,proto3,oneof"`
}
type GossipMessage_StateRequest ¶
type GossipMessage_StateRequest struct { // 用于向远程 peer 节点请求一组区块。 StateRequest *RemoteStateRequest `protobuf:"bytes,17,opt,name=state_request,json=stateRequest,proto3,oneof"` }
type GossipMessage_StateResponse ¶
type GossipMessage_StateResponse struct { // RemoteStateResponse 用于向远程 peer 节点发送一组区块。 StateResponse *RemoteStateResponse `protobuf:"bytes,18,opt,name=state_response,json=stateResponse,proto3,oneof"` }
type GossipMessage_StateSnapshot ¶
type GossipMessage_StateSnapshot struct { // 用于发送状态信息集。 StateSnapshot *StateInfoSnapshot `protobuf:"bytes,15,opt,name=state_snapshot,json=stateSnapshot,proto3,oneof"` }
type GossipMessage_Tag ¶
type GossipMessage_Tag int32
const ( GossipMessage_UNDEFINED GossipMessage_Tag = 0 GossipMessage_EMPTY GossipMessage_Tag = 1 GossipMessage_ORG_ONLY GossipMessage_Tag = 2 GossipMessage_CHAN_ONLY GossipMessage_Tag = 3 GossipMessage_CHAN_AND_ORG GossipMessage_Tag = 4 GossipMessage_CHAN_OR_ORG GossipMessage_Tag = 5 )
func (GossipMessage_Tag) Descriptor ¶
func (GossipMessage_Tag) Descriptor() protoreflect.EnumDescriptor
func (GossipMessage_Tag) Enum ¶
func (x GossipMessage_Tag) Enum() *GossipMessage_Tag
func (GossipMessage_Tag) EnumDescriptor
deprecated
func (GossipMessage_Tag) EnumDescriptor() ([]byte, []int)
Deprecated: Use GossipMessage_Tag.Descriptor instead.
func (GossipMessage_Tag) Number ¶
func (x GossipMessage_Tag) Number() protoreflect.EnumNumber
func (GossipMessage_Tag) String ¶
func (x GossipMessage_Tag) String() string
func (GossipMessage_Tag) Type ¶
func (GossipMessage_Tag) Type() protoreflect.EnumType
type GossipServer ¶
type GossipServer interface { GossipStream(Gossip_GossipStreamServer) error Ping(context.Context, *Empty) (*Empty, error) }
GossipServer is the server API for Gossip service.
type LeadershipMessage ¶
type LeadershipMessage struct { PkiId []byte `protobuf:"bytes,1,opt,name=pki_id,json=pkiId,proto3" json:"pki_id,omitempty"` Timestamp *PeerTime `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` IsDeclaration bool `protobuf:"varint,3,opt,name=is_declaration,json=isDeclaration,proto3" json:"is_declaration,omitempty"` // contains filtered or unexported fields }
LeadershipMessage 在领导者选举期间发送,以通知远程同伴同伴宣布自己为领导者的意图
func (*LeadershipMessage) Descriptor
deprecated
func (*LeadershipMessage) Descriptor() ([]byte, []int)
Deprecated: Use LeadershipMessage.ProtoReflect.Descriptor instead.
func (*LeadershipMessage) GetIsDeclaration ¶
func (x *LeadershipMessage) GetIsDeclaration() bool
func (*LeadershipMessage) GetPkiId ¶
func (x *LeadershipMessage) GetPkiId() []byte
func (*LeadershipMessage) GetTimestamp ¶
func (x *LeadershipMessage) GetTimestamp() *PeerTime
func (*LeadershipMessage) ProtoMessage ¶
func (*LeadershipMessage) ProtoMessage()
func (*LeadershipMessage) ProtoReflect ¶
func (x *LeadershipMessage) ProtoReflect() protoreflect.Message
func (*LeadershipMessage) Reset ¶
func (x *LeadershipMessage) Reset()
func (*LeadershipMessage) String ¶
func (x *LeadershipMessage) String() string
type Membership ¶
type Membership struct { Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` Metadata []byte `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` PkiId []byte `protobuf:"bytes,3,opt,name=pki_id,json=pkiId,proto3" json:"pki_id,omitempty"` // contains filtered or unexported fields }
Member 持有 peer 的成员相关信息。
func (*Membership) Descriptor
deprecated
func (*Membership) Descriptor() ([]byte, []int)
Deprecated: Use Membership.ProtoReflect.Descriptor instead.
func (*Membership) GetEndpoint ¶
func (x *Membership) GetEndpoint() string
func (*Membership) GetMetadata ¶
func (x *Membership) GetMetadata() []byte
func (*Membership) GetPkiId ¶
func (x *Membership) GetPkiId() []byte
func (*Membership) ProtoMessage ¶
func (*Membership) ProtoMessage()
func (*Membership) ProtoReflect ¶
func (x *Membership) ProtoReflect() protoreflect.Message
func (*Membership) Reset ¶
func (x *Membership) Reset()
func (*Membership) String ¶
func (x *Membership) String() string
type MembershipRequest ¶
type MembershipRequest struct { SelfInformation *Envelope `protobuf:"bytes,1,opt,name=self_information,json=selfInformation,proto3" json:"self_information,omitempty"` Known [][]byte `protobuf:"bytes,2,rep,name=known,proto3" json:"known,omitempty"` // contains filtered or unexported fields }
MembershipRequest 用于向远程 peer 询问成员信息。
func (*MembershipRequest) Descriptor
deprecated
func (*MembershipRequest) Descriptor() ([]byte, []int)
Deprecated: Use MembershipRequest.ProtoReflect.Descriptor instead.
func (*MembershipRequest) GetKnown ¶
func (x *MembershipRequest) GetKnown() [][]byte
func (*MembershipRequest) GetSelfInformation ¶
func (x *MembershipRequest) GetSelfInformation() *Envelope
func (*MembershipRequest) ProtoMessage ¶
func (*MembershipRequest) ProtoMessage()
func (*MembershipRequest) ProtoReflect ¶
func (x *MembershipRequest) ProtoReflect() protoreflect.Message
func (*MembershipRequest) Reset ¶
func (x *MembershipRequest) Reset()
func (*MembershipRequest) String ¶
func (x *MembershipRequest) String() string
type MembershipResponse ¶
type MembershipResponse struct { Alive []*Envelope `protobuf:"bytes,1,rep,name=alive,proto3" json:"alive,omitempty"` Dead []*Envelope `protobuf:"bytes,2,rep,name=dead,proto3" json:"dead,omitempty"` PkiId []byte `protobuf:"bytes,3,opt,name=pki_id,json=pkiId,proto3" json:"pki_id,omitempty"` Endpoint string `protobuf:"bytes,4,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // contains filtered or unexported fields }
MembershipResponse 用来回复 MembershipRequest。
func (*MembershipResponse) Descriptor
deprecated
func (*MembershipResponse) Descriptor() ([]byte, []int)
Deprecated: Use MembershipResponse.ProtoReflect.Descriptor instead.
func (*MembershipResponse) GetAlive ¶
func (x *MembershipResponse) GetAlive() []*Envelope
func (*MembershipResponse) GetDead ¶
func (x *MembershipResponse) GetDead() []*Envelope
func (*MembershipResponse) GetEndpoint ¶
func (x *MembershipResponse) GetEndpoint() string
func (*MembershipResponse) GetPkiId ¶
func (x *MembershipResponse) GetPkiId() []byte
func (*MembershipResponse) ProtoMessage ¶
func (*MembershipResponse) ProtoMessage()
func (*MembershipResponse) ProtoReflect ¶
func (x *MembershipResponse) ProtoReflect() protoreflect.Message
func (*MembershipResponse) Reset ¶
func (x *MembershipResponse) Reset()
func (*MembershipResponse) String ¶
func (x *MembershipResponse) String() string
type Payload ¶
type Payload struct { SeqNum uint64 `protobuf:"varint,1,opt,name=seq_num,json=seqNum,proto3" json:"seq_num,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` PrivateData [][]byte `protobuf:"bytes,3,rep,name=private_data,json=privateData,proto3" json:"private_data,omitempty"` // contains filtered or unexported fields }
Payload 包含一个区块。
func (*Payload) Descriptor
deprecated
func (*Payload) GetPrivateData ¶
func (*Payload) ProtoMessage ¶
func (*Payload) ProtoMessage()
func (*Payload) ProtoReflect ¶
func (x *Payload) ProtoReflect() protoreflect.Message
type PeerIdentity ¶
type PeerIdentity struct { PkiId []byte `protobuf:"bytes,1,opt,name=pki_id,json=pkiId,proto3" json:"pki_id,omitempty"` Cert []byte `protobuf:"bytes,2,opt,name=cert,proto3" json:"cert,omitempty"` Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
PeerIdentity 定义了 peer 节点的身份。用于让其他 peer 节点了解某个 peer 节点的身份。
func (*PeerIdentity) Descriptor
deprecated
func (*PeerIdentity) Descriptor() ([]byte, []int)
Deprecated: Use PeerIdentity.ProtoReflect.Descriptor instead.
func (*PeerIdentity) GetCert ¶
func (x *PeerIdentity) GetCert() []byte
func (*PeerIdentity) GetMetadata ¶
func (x *PeerIdentity) GetMetadata() []byte
func (*PeerIdentity) GetPkiId ¶
func (x *PeerIdentity) GetPkiId() []byte
func (*PeerIdentity) ProtoMessage ¶
func (*PeerIdentity) ProtoMessage()
func (*PeerIdentity) ProtoReflect ¶
func (x *PeerIdentity) ProtoReflect() protoreflect.Message
func (*PeerIdentity) Reset ¶
func (x *PeerIdentity) Reset()
func (*PeerIdentity) String ¶
func (x *PeerIdentity) String() string
type PeerTime ¶
type PeerTime struct { // IncNum 字段代表 peer 节点的增量编号,用于标识 peer 在其生命周期内的不同阶段或状态。 // 每当 peer 经历了关键事件或状态变化时,增量编号会递增。它可以用来区分 peer 节点在不 // 同时间点的状态。 IncNum uint64 `protobuf:"varint,1,opt,name=inc_num,json=incNum,proto3" json:"inc_num,omitempty"` // SeqNum 字段代表 peer 节点的序列编号,用于标识 peer 在整个网络中的顺序。每个 peer // 节点在加入网络时被分配一个唯一的序列编号。它可以用来确定 peer 节点在网络中的位置和顺序。 SeqNum uint64 `protobuf:"varint,2,opt,name=seq_num,json=seqNum,proto3" json:"seq_num,omitempty"` // contains filtered or unexported fields }
PeerTime 定义了 peer 生命的逻辑时间。
func (*PeerTime) Descriptor
deprecated
func (*PeerTime) ProtoMessage ¶
func (*PeerTime) ProtoMessage()
func (*PeerTime) ProtoReflect ¶
func (x *PeerTime) ProtoReflect() protoreflect.Message
type PrivateDataMessage ¶
type PrivateDataMessage struct { Payload *PrivatePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
PrivateDataMessage: 包含私人数据信息的信息,在交易获得认可后分发
func (*PrivateDataMessage) Descriptor
deprecated
func (*PrivateDataMessage) Descriptor() ([]byte, []int)
Deprecated: Use PrivateDataMessage.ProtoReflect.Descriptor instead.
func (*PrivateDataMessage) GetPayload ¶
func (x *PrivateDataMessage) GetPayload() *PrivatePayload
func (*PrivateDataMessage) ProtoMessage ¶
func (*PrivateDataMessage) ProtoMessage()
func (*PrivateDataMessage) ProtoReflect ¶
func (x *PrivateDataMessage) ProtoReflect() protoreflect.Message
func (*PrivateDataMessage) Reset ¶
func (x *PrivateDataMessage) Reset()
func (*PrivateDataMessage) String ¶
func (x *PrivateDataMessage) String() string
type PrivatePayload ¶
type PrivatePayload struct { CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` TxId string `protobuf:"bytes,3,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` PrivateRwset []byte `protobuf:"bytes,4,opt,name=private_rwset,json=privateRwset,proto3" json:"private_rwset,omitempty"` PrivateSimHeight uint64 `protobuf:"varint,5,opt,name=private_sim_height,json=privateSimHeight,proto3" json:"private_sim_height,omitempty"` // contains filtered or unexported fields }
func (*PrivatePayload) Descriptor
deprecated
func (*PrivatePayload) Descriptor() ([]byte, []int)
Deprecated: Use PrivatePayload.ProtoReflect.Descriptor instead.
func (*PrivatePayload) GetCollectionName ¶
func (x *PrivatePayload) GetCollectionName() string
func (*PrivatePayload) GetNamespace ¶
func (x *PrivatePayload) GetNamespace() string
func (*PrivatePayload) GetPrivateRwset ¶
func (x *PrivatePayload) GetPrivateRwset() []byte
func (*PrivatePayload) GetPrivateSimHeight ¶
func (x *PrivatePayload) GetPrivateSimHeight() uint64
func (*PrivatePayload) GetTxId ¶
func (x *PrivatePayload) GetTxId() string
func (*PrivatePayload) ProtoMessage ¶
func (*PrivatePayload) ProtoMessage()
func (*PrivatePayload) ProtoReflect ¶
func (x *PrivatePayload) ProtoReflect() protoreflect.Message
func (*PrivatePayload) Reset ¶
func (x *PrivatePayload) Reset()
func (*PrivatePayload) String ¶
func (x *PrivatePayload) String() string
type Properties ¶
type Properties struct { LedgerHeight uint64 `protobuf:"varint,1,opt,name=ledger_height,json=ledgerHeight,proto3" json:"ledger_height,omitempty"` LeftChannel bool `protobuf:"varint,2,opt,name=left_channel,json=leftChannel,proto3" json:"left_channel,omitempty"` Chaincodes []*Chaincode `protobuf:"bytes,3,rep,name=chaincodes,proto3" json:"chaincodes,omitempty"` // contains filtered or unexported fields }
func (*Properties) Descriptor
deprecated
func (*Properties) Descriptor() ([]byte, []int)
Deprecated: Use Properties.ProtoReflect.Descriptor instead.
func (*Properties) GetChaincodes ¶
func (x *Properties) GetChaincodes() []*Chaincode
func (*Properties) GetLedgerHeight ¶
func (x *Properties) GetLedgerHeight() uint64
func (*Properties) GetLeftChannel ¶
func (x *Properties) GetLeftChannel() bool
func (*Properties) ProtoMessage ¶
func (*Properties) ProtoMessage()
func (*Properties) ProtoReflect ¶
func (x *Properties) ProtoReflect() protoreflect.Message
func (*Properties) Reset ¶
func (x *Properties) Reset()
func (*Properties) String ¶
func (x *Properties) String() string
type PullMsgType ¶
type PullMsgType int32
PullMsgType pull 消息的类型。
const ( PullMsgType_UNDEFINED PullMsgType = 0 PullMsgType_BLOCK_MSG PullMsgType = 1 PullMsgType_IDENTITY_MSG PullMsgType = 2 )
func (PullMsgType) Descriptor ¶
func (PullMsgType) Descriptor() protoreflect.EnumDescriptor
func (PullMsgType) Enum ¶
func (x PullMsgType) Enum() *PullMsgType
func (PullMsgType) EnumDescriptor
deprecated
func (PullMsgType) EnumDescriptor() ([]byte, []int)
Deprecated: Use PullMsgType.Descriptor instead.
func (PullMsgType) Number ¶
func (x PullMsgType) Number() protoreflect.EnumNumber
func (PullMsgType) String ¶
func (x PullMsgType) String() string
func (PullMsgType) Type ¶
func (PullMsgType) Type() protoreflect.EnumType
type PvtDataDigest ¶
type PvtDataDigest struct { TxId string `protobuf:"bytes,1,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Collection string `protobuf:"bytes,3,opt,name=collection,proto3" json:"collection,omitempty"` BlockSeq uint64 `protobuf:"varint,4,opt,name=block_seq,json=blockSeq,proto3" json:"block_seq,omitempty"` SeqInBlock uint64 `protobuf:"varint,5,opt,name=seq_in_block,json=seqInBlock,proto3" json:"seq_in_block,omitempty"` // contains filtered or unexported fields }
PvtDataDigest 定义了私有数据的摘要。
func (*PvtDataDigest) Descriptor
deprecated
func (*PvtDataDigest) Descriptor() ([]byte, []int)
Deprecated: Use PvtDataDigest.ProtoReflect.Descriptor instead.
func (*PvtDataDigest) GetBlockSeq ¶
func (x *PvtDataDigest) GetBlockSeq() uint64
func (*PvtDataDigest) GetCollection ¶
func (x *PvtDataDigest) GetCollection() string
func (*PvtDataDigest) GetNamespace ¶
func (x *PvtDataDigest) GetNamespace() string
func (*PvtDataDigest) GetSeqInBlock ¶
func (x *PvtDataDigest) GetSeqInBlock() uint64
func (*PvtDataDigest) GetTxId ¶
func (x *PvtDataDigest) GetTxId() string
func (*PvtDataDigest) ProtoMessage ¶
func (*PvtDataDigest) ProtoMessage()
func (*PvtDataDigest) ProtoReflect ¶
func (x *PvtDataDigest) ProtoReflect() protoreflect.Message
func (*PvtDataDigest) Reset ¶
func (x *PvtDataDigest) Reset()
func (*PvtDataDigest) String ¶
func (x *PvtDataDigest) String() string
type PvtDataElement ¶
type PvtDataElement struct { Digest *PvtDataDigest `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"` Payload [][]byte `protobuf:"bytes,2,rep,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*PvtDataElement) Descriptor
deprecated
func (*PvtDataElement) Descriptor() ([]byte, []int)
Deprecated: Use PvtDataElement.ProtoReflect.Descriptor instead.
func (*PvtDataElement) GetDigest ¶
func (x *PvtDataElement) GetDigest() *PvtDataDigest
func (*PvtDataElement) GetPayload ¶
func (x *PvtDataElement) GetPayload() [][]byte
func (*PvtDataElement) ProtoMessage ¶
func (*PvtDataElement) ProtoMessage()
func (*PvtDataElement) ProtoReflect ¶
func (x *PvtDataElement) ProtoReflect() protoreflect.Message
func (*PvtDataElement) Reset ¶
func (x *PvtDataElement) Reset()
func (*PvtDataElement) String ¶
func (x *PvtDataElement) String() string
type RemotePvtDataRequest ¶
type RemotePvtDataRequest struct { Digests []*PvtDataDigest `protobuf:"bytes,1,rep,name=digests,proto3" json:"digests,omitempty"` // contains filtered or unexported fields }
RemotePvtDataRequest 信息,用于请求丢失的私有 rwset。
func (*RemotePvtDataRequest) Descriptor
deprecated
func (*RemotePvtDataRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemotePvtDataRequest.ProtoReflect.Descriptor instead.
func (*RemotePvtDataRequest) GetDigests ¶
func (x *RemotePvtDataRequest) GetDigests() []*PvtDataDigest
func (*RemotePvtDataRequest) ProtoMessage ¶
func (*RemotePvtDataRequest) ProtoMessage()
func (*RemotePvtDataRequest) ProtoReflect ¶
func (x *RemotePvtDataRequest) ProtoReflect() protoreflect.Message
func (*RemotePvtDataRequest) Reset ¶
func (x *RemotePvtDataRequest) Reset()
func (*RemotePvtDataRequest) String ¶
func (x *RemotePvtDataRequest) String() string
type RemotePvtDataResponse ¶
type RemotePvtDataResponse struct { Elements []*PvtDataElement `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"` // contains filtered or unexported fields }
RemotePvtDataResponse 用于响应对秘密消息的请求。
func (*RemotePvtDataResponse) Descriptor
deprecated
func (*RemotePvtDataResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemotePvtDataResponse.ProtoReflect.Descriptor instead.
func (*RemotePvtDataResponse) GetElements ¶
func (x *RemotePvtDataResponse) GetElements() []*PvtDataElement
func (*RemotePvtDataResponse) ProtoMessage ¶
func (*RemotePvtDataResponse) ProtoMessage()
func (*RemotePvtDataResponse) ProtoReflect ¶
func (x *RemotePvtDataResponse) ProtoReflect() protoreflect.Message
func (*RemotePvtDataResponse) Reset ¶
func (x *RemotePvtDataResponse) Reset()
func (*RemotePvtDataResponse) String ¶
func (x *RemotePvtDataResponse) String() string
type RemoteStateRequest ¶
type RemoteStateRequest struct { StartSeqNum uint64 `protobuf:"varint,1,opt,name=start_seq_num,json=startSeqNum,proto3" json:"start_seq_num,omitempty"` EndSeqNum uint64 `protobuf:"varint,2,opt,name=end_seq_num,json=endSeqNum,proto3" json:"end_seq_num,omitempty"` // contains filtered or unexported fields }
RemoteStateRequest 用于向远程 peer 节点请求一组区块。
func (*RemoteStateRequest) Descriptor
deprecated
func (*RemoteStateRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoteStateRequest.ProtoReflect.Descriptor instead.
func (*RemoteStateRequest) GetEndSeqNum ¶
func (x *RemoteStateRequest) GetEndSeqNum() uint64
func (*RemoteStateRequest) GetStartSeqNum ¶
func (x *RemoteStateRequest) GetStartSeqNum() uint64
func (*RemoteStateRequest) ProtoMessage ¶
func (*RemoteStateRequest) ProtoMessage()
func (*RemoteStateRequest) ProtoReflect ¶
func (x *RemoteStateRequest) ProtoReflect() protoreflect.Message
func (*RemoteStateRequest) Reset ¶
func (x *RemoteStateRequest) Reset()
func (*RemoteStateRequest) String ¶
func (x *RemoteStateRequest) String() string
type RemoteStateResponse ¶
type RemoteStateResponse struct { Payloads []*Payload `protobuf:"bytes,1,rep,name=payloads,proto3" json:"payloads,omitempty"` // contains filtered or unexported fields }
RemoteStateResponse 用于向远程 peer 节点发送一组区块。
func (*RemoteStateResponse) Descriptor
deprecated
func (*RemoteStateResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoteStateResponse.ProtoReflect.Descriptor instead.
func (*RemoteStateResponse) GetPayloads ¶
func (x *RemoteStateResponse) GetPayloads() []*Payload
func (*RemoteStateResponse) ProtoMessage ¶
func (*RemoteStateResponse) ProtoMessage()
func (*RemoteStateResponse) ProtoReflect ¶
func (x *RemoteStateResponse) ProtoReflect() protoreflect.Message
func (*RemoteStateResponse) Reset ¶
func (x *RemoteStateResponse) Reset()
func (*RemoteStateResponse) String ¶
func (x *RemoteStateResponse) String() string
type Secret ¶
type Secret struct { InternalEndpoint string `protobuf:"bytes,1,opt,name=internal_endpoint,json=internalEndpoint,proto3" json:"internal_endpoint,omitempty"` // contains filtered or unexported fields }
Secret 是一个实体,里面存储着节点在内部网络中的地址,当接收 Envelope 的远程对等 方不应该知道秘密的内容时,可能会从 Envelope 中省略。
func (*Secret) Descriptor
deprecated
func (*Secret) GetInternalEndpoint ¶
func (*Secret) ProtoMessage ¶
func (*Secret) ProtoMessage()
func (*Secret) ProtoReflect ¶
func (x *Secret) ProtoReflect() protoreflect.Message
type SecretEnvelope ¶
type SecretEnvelope struct { // Payload: proto.Marshal(*Secret) Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
SecretEnvelope 的 Payload 字段存储着节点的 InternalEndpoint。
func (*SecretEnvelope) Descriptor
deprecated
func (*SecretEnvelope) Descriptor() ([]byte, []int)
Deprecated: Use SecretEnvelope.ProtoReflect.Descriptor instead.
func (*SecretEnvelope) GetPayload ¶
func (x *SecretEnvelope) GetPayload() []byte
func (*SecretEnvelope) GetSignature ¶
func (x *SecretEnvelope) GetSignature() []byte
func (*SecretEnvelope) ProtoMessage ¶
func (*SecretEnvelope) ProtoMessage()
func (*SecretEnvelope) ProtoReflect ¶
func (x *SecretEnvelope) ProtoReflect() protoreflect.Message
func (*SecretEnvelope) Reset ¶
func (x *SecretEnvelope) Reset()
func (*SecretEnvelope) String ¶
func (x *SecretEnvelope) String() string
type StateInfo ¶
type StateInfo struct { Timestamp *PeerTime `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` PkiId []byte `protobuf:"bytes,2,opt,name=pki_id,json=pkiId,proto3" json:"pki_id,omitempty"` // ChannelMAC 是一个认证码,用来证明 peer 节点知晓 channel 的名字。 Channel_MAC []byte `protobuf:"bytes,3,opt,name=channel_MAC,json=channelMAC,proto3" json:"channel_MAC,omitempty"` Properties *Properties `protobuf:"bytes,4,opt,name=properties,proto3" json:"properties,omitempty"` // contains filtered or unexported fields }
StateInfo 用于一个 peer 节点向其他 peer 节点传递自己的状态信息。
func (*StateInfo) Descriptor
deprecated
func (*StateInfo) GetChannel_MAC ¶
func (*StateInfo) GetProperties ¶
func (x *StateInfo) GetProperties() *Properties
func (*StateInfo) GetTimestamp ¶
func (*StateInfo) ProtoMessage ¶
func (*StateInfo) ProtoMessage()
func (*StateInfo) ProtoReflect ¶
func (x *StateInfo) ProtoReflect() protoreflect.Message
type StateInfoPullRequest ¶
type StateInfoPullRequest struct { Channel_MAC []byte `protobuf:"bytes,1,opt,name=channel_MAC,json=channelMAC,proto3" json:"channel_MAC,omitempty"` // contains filtered or unexported fields }
StateInfoPullRequest 用于向远程 peer 节点获取 StateInfoSnapshot。
func (*StateInfoPullRequest) Descriptor
deprecated
func (*StateInfoPullRequest) Descriptor() ([]byte, []int)
Deprecated: Use StateInfoPullRequest.ProtoReflect.Descriptor instead.
func (*StateInfoPullRequest) GetChannel_MAC ¶
func (x *StateInfoPullRequest) GetChannel_MAC() []byte
func (*StateInfoPullRequest) ProtoMessage ¶
func (*StateInfoPullRequest) ProtoMessage()
func (*StateInfoPullRequest) ProtoReflect ¶
func (x *StateInfoPullRequest) ProtoReflect() protoreflect.Message
func (*StateInfoPullRequest) Reset ¶
func (x *StateInfoPullRequest) Reset()
func (*StateInfoPullRequest) String ¶
func (x *StateInfoPullRequest) String() string
type StateInfoSnapshot ¶
type StateInfoSnapshot struct { Elements []*Envelope `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"` // contains filtered or unexported fields }
StateInfoSnapshot 是 StateInfo 的聚合。
func (*StateInfoSnapshot) Descriptor
deprecated
func (*StateInfoSnapshot) Descriptor() ([]byte, []int)
Deprecated: Use StateInfoSnapshot.ProtoReflect.Descriptor instead.
func (*StateInfoSnapshot) GetElements ¶
func (x *StateInfoSnapshot) GetElements() []*Envelope
func (*StateInfoSnapshot) ProtoMessage ¶
func (*StateInfoSnapshot) ProtoMessage()
func (*StateInfoSnapshot) ProtoReflect ¶
func (x *StateInfoSnapshot) ProtoReflect() protoreflect.Message
func (*StateInfoSnapshot) Reset ¶
func (x *StateInfoSnapshot) Reset()
func (*StateInfoSnapshot) String ¶
func (x *StateInfoSnapshot) String() string
type UnimplementedGossipServer ¶
type UnimplementedGossipServer struct { }
UnimplementedGossipServer can be embedded to have forward compatible implementations.
func (*UnimplementedGossipServer) GossipStream ¶
func (*UnimplementedGossipServer) GossipStream(Gossip_GossipStreamServer) error