Documentation ¶
Overview ¶
Package protobuf is a generated GoMock package.
Index ¶
- Variables
- func RegisterNetworkServer(s grpc.ServiceRegistrar, srv NetworkServer)
- type AdvertHashes
- func (*AdvertHashes) Descriptor() ([]byte, []int)deprecated
- func (x *AdvertHashes) GetBlocks() []*BlockHashes
- func (x *AdvertHashes) GetCurrentBlockDate() uint32
- func (x *AdvertHashes) GetHistoricHash() []byte
- func (*AdvertHashes) ProtoMessage()
- func (x *AdvertHashes) ProtoReflect() protoreflect.Message
- func (x *AdvertHashes) Reset()
- func (x *AdvertHashes) String() string
- type BlockHashes
- type Diagnostics
- func (*Diagnostics) Descriptor() ([]byte, []int)deprecated
- func (x *Diagnostics) GetNumberOfTransactions() uint32
- func (x *Diagnostics) GetPeerID() string
- func (x *Diagnostics) GetPeers() []string
- func (x *Diagnostics) GetSoftwareID() string
- func (x *Diagnostics) GetSoftwareVersion() string
- func (x *Diagnostics) GetUptime() uint32
- func (*Diagnostics) ProtoMessage()
- func (x *Diagnostics) ProtoReflect() protoreflect.Message
- func (x *Diagnostics) Reset()
- func (x *Diagnostics) String() string
- type Header
- type MockNetworkClient
- type MockNetworkClientMockRecorder
- type MockNetworkServer
- type MockNetworkServerMockRecorder
- type MockNetwork_ConnectClient
- func (m *MockNetwork_ConnectClient) CloseSend() error
- func (m *MockNetwork_ConnectClient) Context() context.Context
- func (m *MockNetwork_ConnectClient) EXPECT() *MockNetwork_ConnectClientMockRecorder
- func (m *MockNetwork_ConnectClient) Header() (metadata.MD, error)
- func (m *MockNetwork_ConnectClient) Recv() (*NetworkMessage, error)
- func (m_2 *MockNetwork_ConnectClient) RecvMsg(m interface{}) error
- func (m *MockNetwork_ConnectClient) Send(arg0 *NetworkMessage) error
- func (m_2 *MockNetwork_ConnectClient) SendMsg(m interface{}) error
- func (m *MockNetwork_ConnectClient) Trailer() metadata.MD
- type MockNetwork_ConnectClientMockRecorder
- func (mr *MockNetwork_ConnectClientMockRecorder) CloseSend() *gomock.Call
- func (mr *MockNetwork_ConnectClientMockRecorder) Context() *gomock.Call
- func (mr *MockNetwork_ConnectClientMockRecorder) Header() *gomock.Call
- func (mr *MockNetwork_ConnectClientMockRecorder) Recv() *gomock.Call
- func (mr *MockNetwork_ConnectClientMockRecorder) RecvMsg(m interface{}) *gomock.Call
- func (mr *MockNetwork_ConnectClientMockRecorder) Send(arg0 interface{}) *gomock.Call
- func (mr *MockNetwork_ConnectClientMockRecorder) SendMsg(m interface{}) *gomock.Call
- func (mr *MockNetwork_ConnectClientMockRecorder) Trailer() *gomock.Call
- type MockNetwork_ConnectServer
- func (m *MockNetwork_ConnectServer) Context() context.Context
- func (m *MockNetwork_ConnectServer) EXPECT() *MockNetwork_ConnectServerMockRecorder
- func (m *MockNetwork_ConnectServer) Recv() (*NetworkMessage, error)
- func (m_2 *MockNetwork_ConnectServer) RecvMsg(m interface{}) error
- func (m *MockNetwork_ConnectServer) Send(arg0 *NetworkMessage) error
- func (m *MockNetwork_ConnectServer) SendHeader(arg0 metadata.MD) error
- func (m_2 *MockNetwork_ConnectServer) SendMsg(m interface{}) error
- func (m *MockNetwork_ConnectServer) SetHeader(arg0 metadata.MD) error
- func (m *MockNetwork_ConnectServer) SetTrailer(arg0 metadata.MD)
- type MockNetwork_ConnectServerMockRecorder
- func (mr *MockNetwork_ConnectServerMockRecorder) Context() *gomock.Call
- func (mr *MockNetwork_ConnectServerMockRecorder) Recv() *gomock.Call
- func (mr *MockNetwork_ConnectServerMockRecorder) RecvMsg(m interface{}) *gomock.Call
- func (mr *MockNetwork_ConnectServerMockRecorder) Send(arg0 interface{}) *gomock.Call
- func (mr *MockNetwork_ConnectServerMockRecorder) SendHeader(arg0 interface{}) *gomock.Call
- func (mr *MockNetwork_ConnectServerMockRecorder) SendMsg(m interface{}) *gomock.Call
- func (mr *MockNetwork_ConnectServerMockRecorder) SetHeader(arg0 interface{}) *gomock.Call
- func (mr *MockNetwork_ConnectServerMockRecorder) SetTrailer(arg0 interface{}) *gomock.Call
- type MockUnsafeNetworkServer
- type MockUnsafeNetworkServerMockRecorder
- type NetworkClient
- type NetworkMessage
- func (*NetworkMessage) Descriptor() ([]byte, []int)deprecated
- func (x *NetworkMessage) GetAdvertHashes() *AdvertHashes
- func (x *NetworkMessage) GetDiagnosticsBroadcast() *Diagnostics
- func (m *NetworkMessage) GetMessage() isNetworkMessage_Message
- func (x *NetworkMessage) GetTransactionList() *TransactionList
- func (x *NetworkMessage) GetTransactionListQuery() *TransactionListQuery
- func (x *NetworkMessage) GetTransactionPayload() *TransactionPayload
- func (x *NetworkMessage) GetTransactionPayloadQuery() *TransactionPayloadQuery
- func (*NetworkMessage) ProtoMessage()
- func (x *NetworkMessage) ProtoReflect() protoreflect.Message
- func (x *NetworkMessage) Reset()
- func (x *NetworkMessage) String() string
- type NetworkMessage_AdvertHashes
- type NetworkMessage_DiagnosticsBroadcast
- type NetworkMessage_TransactionList
- type NetworkMessage_TransactionListQuery
- type NetworkMessage_TransactionPayload
- type NetworkMessage_TransactionPayloadQuery
- type NetworkServer
- type Network_ConnectClient
- type Network_ConnectServer
- type Transaction
- type TransactionList
- func (*TransactionList) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionList) GetBlockDate() uint32
- func (x *TransactionList) GetTransactions() []*Transaction
- func (*TransactionList) ProtoMessage()
- func (x *TransactionList) ProtoReflect() protoreflect.Message
- func (x *TransactionList) Reset()
- func (x *TransactionList) String() string
- type TransactionListQuery
- func (*TransactionListQuery) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionListQuery) GetBlockDate() uint32
- func (*TransactionListQuery) ProtoMessage()
- func (x *TransactionListQuery) ProtoReflect() protoreflect.Message
- func (x *TransactionListQuery) Reset()
- func (x *TransactionListQuery) String() string
- type TransactionPayload
- func (*TransactionPayload) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionPayload) GetData() []byte
- func (x *TransactionPayload) GetPayloadHash() []byte
- func (*TransactionPayload) ProtoMessage()
- func (x *TransactionPayload) ProtoReflect() protoreflect.Message
- func (x *TransactionPayload) Reset()
- func (x *TransactionPayload) String() string
- type TransactionPayloadQuery
- func (*TransactionPayloadQuery) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionPayloadQuery) GetPayloadHash() []byte
- func (*TransactionPayloadQuery) ProtoMessage()
- func (x *TransactionPayloadQuery) ProtoReflect() protoreflect.Message
- func (x *TransactionPayloadQuery) Reset()
- func (x *TransactionPayloadQuery) String() string
- type UnimplementedNetworkServer
- type UnsafeNetworkServer
Constants ¶
This section is empty.
Variables ¶
var File_transport_v1_protobuf_network_proto protoreflect.FileDescriptor
var Network_ServiceDesc = grpc.ServiceDesc{ ServiceName: "transport.Network", HandlerType: (*NetworkServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Connect", Handler: _Network_Connect_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "transport/v1/protobuf/network.proto", }
Network_ServiceDesc is the grpc.ServiceDesc for Network service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNetworkServer ¶
func RegisterNetworkServer(s grpc.ServiceRegistrar, srv NetworkServer)
Types ¶
type AdvertHashes ¶
type AdvertHashes struct { // currentBlockDate contains a Unix timestamp at which the current block started (UTC). CurrentBlockDate uint32 `protobuf:"varint,1,opt,name=currentBlockDate,proto3" json:"currentBlockDate,omitempty"` // blocks contains the DAG blocks (as specified in RFC005) except the historic block. The historic block's hash // is specified in the `historicHash` field. In this `blocks` field the first entry is the oldest block (after the // historic block), the last entry is the current block. Blocks []*BlockHashes `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"` // historicHash contains the XOR of all head hashes leading up to (but not including) the first block. HistoricHash []byte `protobuf:"bytes,3,opt,name=historicHash,proto3" json:"historicHash,omitempty"` // contains filtered or unexported fields }
AdvertHashes is a message broadcast for inform peers of the node's DAG state.
func (*AdvertHashes) Descriptor
deprecated
func (*AdvertHashes) Descriptor() ([]byte, []int)
Deprecated: Use AdvertHashes.ProtoReflect.Descriptor instead.
func (*AdvertHashes) GetBlocks ¶
func (x *AdvertHashes) GetBlocks() []*BlockHashes
func (*AdvertHashes) GetCurrentBlockDate ¶
func (x *AdvertHashes) GetCurrentBlockDate() uint32
func (*AdvertHashes) GetHistoricHash ¶
func (x *AdvertHashes) GetHistoricHash() []byte
func (*AdvertHashes) ProtoMessage ¶
func (*AdvertHashes) ProtoMessage()
func (*AdvertHashes) ProtoReflect ¶
func (x *AdvertHashes) ProtoReflect() protoreflect.Message
func (*AdvertHashes) Reset ¶
func (x *AdvertHashes) Reset()
func (*AdvertHashes) String ¶
func (x *AdvertHashes) String() string
type BlockHashes ¶
type BlockHashes struct { // hashes contains the hashes of the heads in this block. Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"` // contains filtered or unexported fields }
BlockHashes contains the head's hashes of a block.
func (*BlockHashes) Descriptor
deprecated
func (*BlockHashes) Descriptor() ([]byte, []int)
Deprecated: Use BlockHashes.ProtoReflect.Descriptor instead.
func (*BlockHashes) GetHashes ¶
func (x *BlockHashes) GetHashes() [][]byte
func (*BlockHashes) ProtoMessage ¶
func (*BlockHashes) ProtoMessage()
func (*BlockHashes) ProtoReflect ¶
func (x *BlockHashes) ProtoReflect() protoreflect.Message
func (*BlockHashes) Reset ¶
func (x *BlockHashes) Reset()
func (*BlockHashes) String ¶
func (x *BlockHashes) String() string
type Diagnostics ¶
type Diagnostics struct { // uptime contains the uptime (time since the node started) in seconds. Uptime uint32 `protobuf:"varint,1,opt,name=uptime,proto3" json:"uptime,omitempty"` // peerID contains the ID of the node. PeerID string `protobuf:"bytes,2,opt,name=peerID,proto3" json:"peerID,omitempty"` // peers contains the peer IDs of the node's peers. Peers []string `protobuf:"bytes,3,rep,name=peers,proto3" json:"peers,omitempty"` // numberOfTransactions contains the total number of transactions on the node's DAG. NumberOfTransactions uint32 `protobuf:"varint,4,opt,name=numberOfTransactions,proto3" json:"numberOfTransactions,omitempty"` // softwareVersion contains an indication of the software version of the node. It's recommended to use a (Git) commit ID that uniquely resolves to a code revision, alternatively a semantic version could be used (e.g. 1.2.5). SoftwareVersion string `protobuf:"bytes,10,opt,name=softwareVersion,proto3" json:"softwareVersion,omitempty"` // softwareID contains an identification of the particular Nuts implementation of the node. // For open source implementations it's recommended to specify URL to the public, open source repository. // Proprietary implementations could specify the product or vendor's name. SoftwareID string `protobuf:"bytes,11,opt,name=softwareID,proto3" json:"softwareID,omitempty"` // contains filtered or unexported fields }
Diagnostics is a message to inform peers of the local node's state. All fields are optional.
func (*Diagnostics) Descriptor
deprecated
func (*Diagnostics) Descriptor() ([]byte, []int)
Deprecated: Use Diagnostics.ProtoReflect.Descriptor instead.
func (*Diagnostics) GetNumberOfTransactions ¶
func (x *Diagnostics) GetNumberOfTransactions() uint32
func (*Diagnostics) GetPeerID ¶
func (x *Diagnostics) GetPeerID() string
func (*Diagnostics) GetPeers ¶
func (x *Diagnostics) GetPeers() []string
func (*Diagnostics) GetSoftwareID ¶
func (x *Diagnostics) GetSoftwareID() string
func (*Diagnostics) GetSoftwareVersion ¶
func (x *Diagnostics) GetSoftwareVersion() string
func (*Diagnostics) GetUptime ¶
func (x *Diagnostics) GetUptime() uint32
func (*Diagnostics) ProtoMessage ¶
func (*Diagnostics) ProtoMessage()
func (*Diagnostics) ProtoReflect ¶
func (x *Diagnostics) ProtoReflect() protoreflect.Message
func (*Diagnostics) Reset ¶
func (x *Diagnostics) Reset()
func (*Diagnostics) String ¶
func (x *Diagnostics) String() string
type Header ¶
type Header struct { // version contains the protocol version of the sent message. Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
Headers contains protocol metadata.
func (*Header) Descriptor
deprecated
func (*Header) GetVersion ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ProtoReflect ¶
func (x *Header) ProtoReflect() protoreflect.Message
type MockNetworkClient ¶
type MockNetworkClient struct {
// contains filtered or unexported fields
}
MockNetworkClient is a mock of NetworkClient interface.
func NewMockNetworkClient ¶
func NewMockNetworkClient(ctrl *gomock.Controller) *MockNetworkClient
NewMockNetworkClient creates a new mock instance.
func (*MockNetworkClient) Connect ¶
func (m *MockNetworkClient) Connect(ctx context.Context, opts ...grpc.CallOption) (Network_ConnectClient, error)
Connect mocks base method.
func (*MockNetworkClient) EXPECT ¶
func (m *MockNetworkClient) EXPECT() *MockNetworkClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockNetworkClientMockRecorder ¶
type MockNetworkClientMockRecorder struct {
// contains filtered or unexported fields
}
MockNetworkClientMockRecorder is the mock recorder for MockNetworkClient.
func (*MockNetworkClientMockRecorder) Connect ¶
func (mr *MockNetworkClientMockRecorder) Connect(ctx interface{}, opts ...interface{}) *gomock.Call
Connect indicates an expected call of Connect.
type MockNetworkServer ¶
type MockNetworkServer struct {
// contains filtered or unexported fields
}
MockNetworkServer is a mock of NetworkServer interface.
func NewMockNetworkServer ¶
func NewMockNetworkServer(ctrl *gomock.Controller) *MockNetworkServer
NewMockNetworkServer creates a new mock instance.
func (*MockNetworkServer) Connect ¶
func (m *MockNetworkServer) Connect(arg0 Network_ConnectServer) error
Connect mocks base method.
func (*MockNetworkServer) EXPECT ¶
func (m *MockNetworkServer) EXPECT() *MockNetworkServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockNetworkServerMockRecorder ¶
type MockNetworkServerMockRecorder struct {
// contains filtered or unexported fields
}
MockNetworkServerMockRecorder is the mock recorder for MockNetworkServer.
func (*MockNetworkServerMockRecorder) Connect ¶
func (mr *MockNetworkServerMockRecorder) Connect(arg0 interface{}) *gomock.Call
Connect indicates an expected call of Connect.
type MockNetwork_ConnectClient ¶
type MockNetwork_ConnectClient struct {
// contains filtered or unexported fields
}
MockNetwork_ConnectClient is a mock of Network_ConnectClient interface.
func NewMockNetwork_ConnectClient ¶
func NewMockNetwork_ConnectClient(ctrl *gomock.Controller) *MockNetwork_ConnectClient
NewMockNetwork_ConnectClient creates a new mock instance.
func (*MockNetwork_ConnectClient) CloseSend ¶
func (m *MockNetwork_ConnectClient) CloseSend() error
CloseSend mocks base method.
func (*MockNetwork_ConnectClient) Context ¶
func (m *MockNetwork_ConnectClient) Context() context.Context
Context mocks base method.
func (*MockNetwork_ConnectClient) EXPECT ¶
func (m *MockNetwork_ConnectClient) EXPECT() *MockNetwork_ConnectClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockNetwork_ConnectClient) Header ¶
func (m *MockNetwork_ConnectClient) Header() (metadata.MD, error)
Header mocks base method.
func (*MockNetwork_ConnectClient) Recv ¶
func (m *MockNetwork_ConnectClient) Recv() (*NetworkMessage, error)
Recv mocks base method.
func (*MockNetwork_ConnectClient) RecvMsg ¶
func (m_2 *MockNetwork_ConnectClient) RecvMsg(m interface{}) error
RecvMsg mocks base method.
func (*MockNetwork_ConnectClient) Send ¶
func (m *MockNetwork_ConnectClient) Send(arg0 *NetworkMessage) error
Send mocks base method.
func (*MockNetwork_ConnectClient) SendMsg ¶
func (m_2 *MockNetwork_ConnectClient) SendMsg(m interface{}) error
SendMsg mocks base method.
func (*MockNetwork_ConnectClient) Trailer ¶
func (m *MockNetwork_ConnectClient) Trailer() metadata.MD
Trailer mocks base method.
type MockNetwork_ConnectClientMockRecorder ¶
type MockNetwork_ConnectClientMockRecorder struct {
// contains filtered or unexported fields
}
MockNetwork_ConnectClientMockRecorder is the mock recorder for MockNetwork_ConnectClient.
func (*MockNetwork_ConnectClientMockRecorder) CloseSend ¶
func (mr *MockNetwork_ConnectClientMockRecorder) CloseSend() *gomock.Call
CloseSend indicates an expected call of CloseSend.
func (*MockNetwork_ConnectClientMockRecorder) Context ¶
func (mr *MockNetwork_ConnectClientMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context.
func (*MockNetwork_ConnectClientMockRecorder) Header ¶
func (mr *MockNetwork_ConnectClientMockRecorder) Header() *gomock.Call
Header indicates an expected call of Header.
func (*MockNetwork_ConnectClientMockRecorder) Recv ¶
func (mr *MockNetwork_ConnectClientMockRecorder) Recv() *gomock.Call
Recv indicates an expected call of Recv.
func (*MockNetwork_ConnectClientMockRecorder) RecvMsg ¶
func (mr *MockNetwork_ConnectClientMockRecorder) RecvMsg(m interface{}) *gomock.Call
RecvMsg indicates an expected call of RecvMsg.
func (*MockNetwork_ConnectClientMockRecorder) Send ¶
func (mr *MockNetwork_ConnectClientMockRecorder) Send(arg0 interface{}) *gomock.Call
Send indicates an expected call of Send.
func (*MockNetwork_ConnectClientMockRecorder) SendMsg ¶
func (mr *MockNetwork_ConnectClientMockRecorder) SendMsg(m interface{}) *gomock.Call
SendMsg indicates an expected call of SendMsg.
func (*MockNetwork_ConnectClientMockRecorder) Trailer ¶
func (mr *MockNetwork_ConnectClientMockRecorder) Trailer() *gomock.Call
Trailer indicates an expected call of Trailer.
type MockNetwork_ConnectServer ¶
type MockNetwork_ConnectServer struct {
// contains filtered or unexported fields
}
MockNetwork_ConnectServer is a mock of Network_ConnectServer interface.
func NewMockNetwork_ConnectServer ¶
func NewMockNetwork_ConnectServer(ctrl *gomock.Controller) *MockNetwork_ConnectServer
NewMockNetwork_ConnectServer creates a new mock instance.
func (*MockNetwork_ConnectServer) Context ¶
func (m *MockNetwork_ConnectServer) Context() context.Context
Context mocks base method.
func (*MockNetwork_ConnectServer) EXPECT ¶
func (m *MockNetwork_ConnectServer) EXPECT() *MockNetwork_ConnectServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockNetwork_ConnectServer) Recv ¶
func (m *MockNetwork_ConnectServer) Recv() (*NetworkMessage, error)
Recv mocks base method.
func (*MockNetwork_ConnectServer) RecvMsg ¶
func (m_2 *MockNetwork_ConnectServer) RecvMsg(m interface{}) error
RecvMsg mocks base method.
func (*MockNetwork_ConnectServer) Send ¶
func (m *MockNetwork_ConnectServer) Send(arg0 *NetworkMessage) error
Send mocks base method.
func (*MockNetwork_ConnectServer) SendHeader ¶
func (m *MockNetwork_ConnectServer) SendHeader(arg0 metadata.MD) error
SendHeader mocks base method.
func (*MockNetwork_ConnectServer) SendMsg ¶
func (m_2 *MockNetwork_ConnectServer) SendMsg(m interface{}) error
SendMsg mocks base method.
func (*MockNetwork_ConnectServer) SetHeader ¶
func (m *MockNetwork_ConnectServer) SetHeader(arg0 metadata.MD) error
SetHeader mocks base method.
func (*MockNetwork_ConnectServer) SetTrailer ¶
func (m *MockNetwork_ConnectServer) SetTrailer(arg0 metadata.MD)
SetTrailer mocks base method.
type MockNetwork_ConnectServerMockRecorder ¶
type MockNetwork_ConnectServerMockRecorder struct {
// contains filtered or unexported fields
}
MockNetwork_ConnectServerMockRecorder is the mock recorder for MockNetwork_ConnectServer.
func (*MockNetwork_ConnectServerMockRecorder) Context ¶
func (mr *MockNetwork_ConnectServerMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context.
func (*MockNetwork_ConnectServerMockRecorder) Recv ¶
func (mr *MockNetwork_ConnectServerMockRecorder) Recv() *gomock.Call
Recv indicates an expected call of Recv.
func (*MockNetwork_ConnectServerMockRecorder) RecvMsg ¶
func (mr *MockNetwork_ConnectServerMockRecorder) RecvMsg(m interface{}) *gomock.Call
RecvMsg indicates an expected call of RecvMsg.
func (*MockNetwork_ConnectServerMockRecorder) Send ¶
func (mr *MockNetwork_ConnectServerMockRecorder) Send(arg0 interface{}) *gomock.Call
Send indicates an expected call of Send.
func (*MockNetwork_ConnectServerMockRecorder) SendHeader ¶
func (mr *MockNetwork_ConnectServerMockRecorder) SendHeader(arg0 interface{}) *gomock.Call
SendHeader indicates an expected call of SendHeader.
func (*MockNetwork_ConnectServerMockRecorder) SendMsg ¶
func (mr *MockNetwork_ConnectServerMockRecorder) SendMsg(m interface{}) *gomock.Call
SendMsg indicates an expected call of SendMsg.
func (*MockNetwork_ConnectServerMockRecorder) SetHeader ¶
func (mr *MockNetwork_ConnectServerMockRecorder) SetHeader(arg0 interface{}) *gomock.Call
SetHeader indicates an expected call of SetHeader.
func (*MockNetwork_ConnectServerMockRecorder) SetTrailer ¶
func (mr *MockNetwork_ConnectServerMockRecorder) SetTrailer(arg0 interface{}) *gomock.Call
SetTrailer indicates an expected call of SetTrailer.
type MockUnsafeNetworkServer ¶
type MockUnsafeNetworkServer struct {
// contains filtered or unexported fields
}
MockUnsafeNetworkServer is a mock of UnsafeNetworkServer interface.
func NewMockUnsafeNetworkServer ¶
func NewMockUnsafeNetworkServer(ctrl *gomock.Controller) *MockUnsafeNetworkServer
NewMockUnsafeNetworkServer creates a new mock instance.
func (*MockUnsafeNetworkServer) EXPECT ¶
func (m *MockUnsafeNetworkServer) EXPECT() *MockUnsafeNetworkServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockUnsafeNetworkServerMockRecorder ¶
type MockUnsafeNetworkServerMockRecorder struct {
// contains filtered or unexported fields
}
MockUnsafeNetworkServerMockRecorder is the mock recorder for MockUnsafeNetworkServer.
type NetworkClient ¶
type NetworkClient interface { // Connect is used to setup a bidirectional streaming gRPC connection over which network messages can be sent. Connect(ctx context.Context, opts ...grpc.CallOption) (Network_ConnectClient, error) }
NetworkClient is the client API for Network service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewNetworkClient ¶
func NewNetworkClient(cc grpc.ClientConnInterface) NetworkClient
type NetworkMessage ¶
type NetworkMessage struct { // Below are the messages that can be sent/received using the NetworkMessage. A NetworkMessage MAY contain multiple // messages. // // Types that are assignable to Message: // *NetworkMessage_AdvertHashes // *NetworkMessage_TransactionListQuery // *NetworkMessage_TransactionList // *NetworkMessage_TransactionPayloadQuery // *NetworkMessage_TransactionPayload // *NetworkMessage_DiagnosticsBroadcast Message isNetworkMessage_Message `protobuf_oneof:"message"` // contains filtered or unexported fields }
We multiplex all of our messages over a single super-message type, because we're using streams. If we did not do that, we'd need to open a stream per operation, which would make the number of required streams explode (since we're building a full mesh network).
func (*NetworkMessage) Descriptor
deprecated
func (*NetworkMessage) Descriptor() ([]byte, []int)
Deprecated: Use NetworkMessage.ProtoReflect.Descriptor instead.
func (*NetworkMessage) GetAdvertHashes ¶
func (x *NetworkMessage) GetAdvertHashes() *AdvertHashes
func (*NetworkMessage) GetDiagnosticsBroadcast ¶
func (x *NetworkMessage) GetDiagnosticsBroadcast() *Diagnostics
func (*NetworkMessage) GetMessage ¶
func (m *NetworkMessage) GetMessage() isNetworkMessage_Message
func (*NetworkMessage) GetTransactionList ¶
func (x *NetworkMessage) GetTransactionList() *TransactionList
func (*NetworkMessage) GetTransactionListQuery ¶
func (x *NetworkMessage) GetTransactionListQuery() *TransactionListQuery
func (*NetworkMessage) GetTransactionPayload ¶
func (x *NetworkMessage) GetTransactionPayload() *TransactionPayload
func (*NetworkMessage) GetTransactionPayloadQuery ¶
func (x *NetworkMessage) GetTransactionPayloadQuery() *TransactionPayloadQuery
func (*NetworkMessage) ProtoMessage ¶
func (*NetworkMessage) ProtoMessage()
func (*NetworkMessage) ProtoReflect ¶
func (x *NetworkMessage) ProtoReflect() protoreflect.Message
func (*NetworkMessage) Reset ¶
func (x *NetworkMessage) Reset()
func (*NetworkMessage) String ¶
func (x *NetworkMessage) String() string
type NetworkMessage_AdvertHashes ¶
type NetworkMessage_AdvertHashes struct {
AdvertHashes *AdvertHashes `protobuf:"bytes,100,opt,name=advertHashes,proto3,oneof"`
}
type NetworkMessage_DiagnosticsBroadcast ¶
type NetworkMessage_DiagnosticsBroadcast struct {
DiagnosticsBroadcast *Diagnostics `protobuf:"bytes,105,opt,name=diagnosticsBroadcast,proto3,oneof"`
}
type NetworkMessage_TransactionList ¶
type NetworkMessage_TransactionList struct {
TransactionList *TransactionList `protobuf:"bytes,102,opt,name=TransactionList,proto3,oneof"`
}
type NetworkMessage_TransactionListQuery ¶
type NetworkMessage_TransactionListQuery struct {
TransactionListQuery *TransactionListQuery `protobuf:"bytes,101,opt,name=TransactionListQuery,proto3,oneof"`
}
type NetworkMessage_TransactionPayload ¶
type NetworkMessage_TransactionPayload struct {
TransactionPayload *TransactionPayload `protobuf:"bytes,104,opt,name=transactionPayload,proto3,oneof"`
}
type NetworkMessage_TransactionPayloadQuery ¶
type NetworkMessage_TransactionPayloadQuery struct {
TransactionPayloadQuery *TransactionPayloadQuery `protobuf:"bytes,103,opt,name=transactionPayloadQuery,proto3,oneof"`
}
type NetworkServer ¶
type NetworkServer interface { // Connect is used to setup a bidirectional streaming gRPC connection over which network messages can be sent. Connect(Network_ConnectServer) error }
NetworkServer is the server API for Network service. All implementations should embed UnimplementedNetworkServer for forward compatibility
type Network_ConnectClient ¶
type Network_ConnectClient interface { Send(*NetworkMessage) error Recv() (*NetworkMessage, error) grpc.ClientStream }
type Network_ConnectServer ¶
type Network_ConnectServer interface { Send(*NetworkMessage) error Recv() (*NetworkMessage, error) grpc.ServerStream }
type Transaction ¶
type Transaction struct { // hash contains the reference of the transaction, as specified by RFC004. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // data contains the data of the transaction, which is a JWS as specified by RFC004. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
Transaction represents a transaction on the DAG.
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetData ¶
func (x *Transaction) GetData() []byte
func (*Transaction) GetHash ¶
func (x *Transaction) GetHash() []byte
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
type TransactionList ¶
type TransactionList struct { // blockDate specifies start date of the block (as Unix timestamp, in UTC) which the transactions belong to. BlockDate uint32 `protobuf:"varint,1,opt,name=blockDate,proto3" json:"blockDate,omitempty"` // transactions contains the peer's transactions for the specified block. Transactions []*Transaction `protobuf:"bytes,10,rep,name=transactions,proto3" json:"transactions,omitempty"` // contains filtered or unexported fields }
TransactionList is the response message for TransactionListQuery.
func (*TransactionList) Descriptor
deprecated
func (*TransactionList) Descriptor() ([]byte, []int)
Deprecated: Use TransactionList.ProtoReflect.Descriptor instead.
func (*TransactionList) GetBlockDate ¶
func (x *TransactionList) GetBlockDate() uint32
func (*TransactionList) GetTransactions ¶
func (x *TransactionList) GetTransactions() []*Transaction
func (*TransactionList) ProtoMessage ¶
func (*TransactionList) ProtoMessage()
func (*TransactionList) ProtoReflect ¶
func (x *TransactionList) ProtoReflect() protoreflect.Message
func (*TransactionList) Reset ¶
func (x *TransactionList) Reset()
func (*TransactionList) String ¶
func (x *TransactionList) String() string
type TransactionListQuery ¶
type TransactionListQuery struct { // blockDate specifies start date of the block (as Unix timestamp, in UTC) which is queried. BlockDate uint32 `protobuf:"varint,1,opt,name=blockDate,proto3" json:"blockDate,omitempty"` // contains filtered or unexported fields }
TransactionListQuery is a message used to query a peer's TransactionList.
func (*TransactionListQuery) Descriptor
deprecated
func (*TransactionListQuery) Descriptor() ([]byte, []int)
Deprecated: Use TransactionListQuery.ProtoReflect.Descriptor instead.
func (*TransactionListQuery) GetBlockDate ¶
func (x *TransactionListQuery) GetBlockDate() uint32
func (*TransactionListQuery) ProtoMessage ¶
func (*TransactionListQuery) ProtoMessage()
func (*TransactionListQuery) ProtoReflect ¶
func (x *TransactionListQuery) ProtoReflect() protoreflect.Message
func (*TransactionListQuery) Reset ¶
func (x *TransactionListQuery) Reset()
func (*TransactionListQuery) String ¶
func (x *TransactionListQuery) String() string
type TransactionPayload ¶
type TransactionPayload struct { // payloadHash contains the SHA-256 hash of the payload, as specified by RFC004. PayloadHash []byte `protobuf:"bytes,1,opt,name=payloadHash,proto3" json:"payloadHash,omitempty"` // data contains the actual payload. Data []byte `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
TransactionPayload is the response message for TransactionPayloadQuery.
func (*TransactionPayload) Descriptor
deprecated
func (*TransactionPayload) Descriptor() ([]byte, []int)
Deprecated: Use TransactionPayload.ProtoReflect.Descriptor instead.
func (*TransactionPayload) GetData ¶
func (x *TransactionPayload) GetData() []byte
func (*TransactionPayload) GetPayloadHash ¶
func (x *TransactionPayload) GetPayloadHash() []byte
func (*TransactionPayload) ProtoMessage ¶
func (*TransactionPayload) ProtoMessage()
func (*TransactionPayload) ProtoReflect ¶
func (x *TransactionPayload) ProtoReflect() protoreflect.Message
func (*TransactionPayload) Reset ¶
func (x *TransactionPayload) Reset()
func (*TransactionPayload) String ¶
func (x *TransactionPayload) String() string
type TransactionPayloadQuery ¶
type TransactionPayloadQuery struct { // payloadHash contains the SHA-256 hash of the payload which the node would like to receive, as specified by RFC004. PayloadHash []byte `protobuf:"bytes,1,opt,name=payloadHash,proto3" json:"payloadHash,omitempty"` // contains filtered or unexported fields }
TransactionPayloadQuery is a message used to query the payload of a transaction.
func (*TransactionPayloadQuery) Descriptor
deprecated
func (*TransactionPayloadQuery) Descriptor() ([]byte, []int)
Deprecated: Use TransactionPayloadQuery.ProtoReflect.Descriptor instead.
func (*TransactionPayloadQuery) GetPayloadHash ¶
func (x *TransactionPayloadQuery) GetPayloadHash() []byte
func (*TransactionPayloadQuery) ProtoMessage ¶
func (*TransactionPayloadQuery) ProtoMessage()
func (*TransactionPayloadQuery) ProtoReflect ¶
func (x *TransactionPayloadQuery) ProtoReflect() protoreflect.Message
func (*TransactionPayloadQuery) Reset ¶
func (x *TransactionPayloadQuery) Reset()
func (*TransactionPayloadQuery) String ¶
func (x *TransactionPayloadQuery) String() string
type UnimplementedNetworkServer ¶
type UnimplementedNetworkServer struct { }
UnimplementedNetworkServer should be embedded to have forward compatible implementations.
func (UnimplementedNetworkServer) Connect ¶
func (UnimplementedNetworkServer) Connect(Network_ConnectServer) error
type UnsafeNetworkServer ¶
type UnsafeNetworkServer interface {
// contains filtered or unexported methods
}
UnsafeNetworkServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NetworkServer will result in compilation errors.