Documentation ¶
Index ¶
- Variables
- func RegisterHostServer(s *grpc.Server, srv HostServer)
- type AddPeerAddressReq
- func (*AddPeerAddressReq) Descriptor() ([]byte, []int)
- func (m *AddPeerAddressReq) GetAddress() []byte
- func (m *AddPeerAddressReq) GetPeerId() []byte
- func (m *AddPeerAddressReq) Marshal() (dAtA []byte, err error)
- func (m *AddPeerAddressReq) MarshalTo(dAtA []byte) (int, error)
- func (*AddPeerAddressReq) ProtoMessage()
- func (m *AddPeerAddressReq) Reset()
- func (m *AddPeerAddressReq) Size() (n int)
- func (m *AddPeerAddressReq) String() string
- func (m *AddPeerAddressReq) Unmarshal(dAtA []byte) error
- func (m *AddPeerAddressReq) XXX_DiscardUnknown()
- func (m *AddPeerAddressReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *AddPeerAddressReq) XXX_Merge(src proto.Message)
- func (m *AddPeerAddressReq) XXX_Size() int
- func (m *AddPeerAddressReq) XXX_Unmarshal(b []byte) error
- type Address
- func (*Address) Descriptor() ([]byte, []int)
- func (m *Address) GetAddress() []byte
- func (m *Address) Marshal() (dAtA []byte, err error)
- func (m *Address) MarshalTo(dAtA []byte) (int, error)
- func (*Address) ProtoMessage()
- func (m *Address) Reset()
- func (m *Address) Size() (n int)
- func (m *Address) String() string
- func (m *Address) Unmarshal(dAtA []byte) error
- func (m *Address) XXX_DiscardUnknown()
- func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Address) XXX_Merge(src proto.Message)
- func (m *Address) XXX_Size() int
- func (m *Address) XXX_Unmarshal(b []byte) error
- type AddressesReq
- func (*AddressesReq) Descriptor() ([]byte, []int)
- func (m *AddressesReq) Marshal() (dAtA []byte, err error)
- func (m *AddressesReq) MarshalTo(dAtA []byte) (int, error)
- func (*AddressesReq) ProtoMessage()
- func (m *AddressesReq) Reset()
- func (m *AddressesReq) Size() (n int)
- func (m *AddressesReq) String() string
- func (m *AddressesReq) Unmarshal(dAtA []byte) error
- func (m *AddressesReq) XXX_DiscardUnknown()
- func (m *AddressesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *AddressesReq) XXX_Merge(src proto.Message)
- func (m *AddressesReq) XXX_Size() int
- func (m *AddressesReq) XXX_Unmarshal(b []byte) error
- type ConnectReq
- func (*ConnectReq) Descriptor() ([]byte, []int)
- func (m *ConnectReq) GetAddress() []byte
- func (m *ConnectReq) Marshal() (dAtA []byte, err error)
- func (m *ConnectReq) MarshalTo(dAtA []byte) (int, error)
- func (*ConnectReq) ProtoMessage()
- func (m *ConnectReq) Reset()
- func (m *ConnectReq) Size() (n int)
- func (m *ConnectReq) String() string
- func (m *ConnectReq) Unmarshal(dAtA []byte) error
- func (m *ConnectReq) XXX_DiscardUnknown()
- func (m *ConnectReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ConnectReq) XXX_Merge(src proto.Message)
- func (m *ConnectReq) XXX_Size() int
- func (m *ConnectReq) XXX_Unmarshal(b []byte) error
- type Connection
- func (*Connection) Descriptor() ([]byte, []int)
- func (m *Connection) GetLocalAddress() []byte
- func (m *Connection) GetPeerId() []byte
- func (m *Connection) GetRemoteAddress() []byte
- func (m *Connection) Marshal() (dAtA []byte, err error)
- func (m *Connection) MarshalTo(dAtA []byte) (int, error)
- func (*Connection) ProtoMessage()
- func (m *Connection) Reset()
- func (m *Connection) Size() (n int)
- func (m *Connection) String() string
- func (m *Connection) Unmarshal(dAtA []byte) error
- func (m *Connection) XXX_DiscardUnknown()
- func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Connection) XXX_Merge(src proto.Message)
- func (m *Connection) XXX_Size() int
- func (m *Connection) XXX_Unmarshal(b []byte) error
- type HostClient
- type HostServer
- type Host_AddressesClient
- type Host_AddressesServer
- type Host_ClearPeerAddressesClient
- type Host_ClearPeerAddressesServer
- type Host_ConnectClient
- type Host_ConnectServer
- type Host_PeerAddressesClient
- type Host_PeerAddressesServer
- type IdReq
- func (*IdReq) Descriptor() ([]byte, []int)
- func (m *IdReq) Marshal() (dAtA []byte, err error)
- func (m *IdReq) MarshalTo(dAtA []byte) (int, error)
- func (*IdReq) ProtoMessage()
- func (m *IdReq) Reset()
- func (m *IdReq) Size() (n int)
- func (m *IdReq) String() string
- func (m *IdReq) Unmarshal(dAtA []byte) error
- func (m *IdReq) XXX_DiscardUnknown()
- func (m *IdReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *IdReq) XXX_Merge(src proto.Message)
- func (m *IdReq) XXX_Size() int
- func (m *IdReq) XXX_Unmarshal(b []byte) error
- type PeerAddressesReq
- func (*PeerAddressesReq) Descriptor() ([]byte, []int)
- func (m *PeerAddressesReq) GetPeerId() []byte
- func (m *PeerAddressesReq) Marshal() (dAtA []byte, err error)
- func (m *PeerAddressesReq) MarshalTo(dAtA []byte) (int, error)
- func (*PeerAddressesReq) ProtoMessage()
- func (m *PeerAddressesReq) Reset()
- func (m *PeerAddressesReq) Size() (n int)
- func (m *PeerAddressesReq) String() string
- func (m *PeerAddressesReq) Unmarshal(dAtA []byte) error
- func (m *PeerAddressesReq) XXX_DiscardUnknown()
- func (m *PeerAddressesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PeerAddressesReq) XXX_Merge(src proto.Message)
- func (m *PeerAddressesReq) XXX_Size() int
- func (m *PeerAddressesReq) XXX_Unmarshal(b []byte) error
- type PeerId
- func (*PeerId) Descriptor() ([]byte, []int)
- func (m *PeerId) GetId() []byte
- func (m *PeerId) Marshal() (dAtA []byte, err error)
- func (m *PeerId) MarshalTo(dAtA []byte) (int, error)
- func (*PeerId) ProtoMessage()
- func (m *PeerId) Reset()
- func (m *PeerId) Size() (n int)
- func (m *PeerId) String() string
- func (m *PeerId) Unmarshal(dAtA []byte) error
- func (m *PeerId) XXX_DiscardUnknown()
- func (m *PeerId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PeerId) XXX_Merge(src proto.Message)
- func (m *PeerId) XXX_Size() int
- func (m *PeerId) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthHost = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHost = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterHostServer ¶
func RegisterHostServer(s *grpc.Server, srv HostServer)
Types ¶
type AddPeerAddressReq ¶
type AddPeerAddressReq struct { PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The add peer address request message.
func (*AddPeerAddressReq) Descriptor ¶
func (*AddPeerAddressReq) Descriptor() ([]byte, []int)
func (*AddPeerAddressReq) GetAddress ¶
func (m *AddPeerAddressReq) GetAddress() []byte
func (*AddPeerAddressReq) GetPeerId ¶
func (m *AddPeerAddressReq) GetPeerId() []byte
func (*AddPeerAddressReq) Marshal ¶
func (m *AddPeerAddressReq) Marshal() (dAtA []byte, err error)
func (*AddPeerAddressReq) MarshalTo ¶
func (m *AddPeerAddressReq) MarshalTo(dAtA []byte) (int, error)
func (*AddPeerAddressReq) ProtoMessage ¶
func (*AddPeerAddressReq) ProtoMessage()
func (*AddPeerAddressReq) Reset ¶
func (m *AddPeerAddressReq) Reset()
func (*AddPeerAddressReq) Size ¶
func (m *AddPeerAddressReq) Size() (n int)
func (*AddPeerAddressReq) String ¶
func (m *AddPeerAddressReq) String() string
func (*AddPeerAddressReq) Unmarshal ¶
func (m *AddPeerAddressReq) Unmarshal(dAtA []byte) error
func (*AddPeerAddressReq) XXX_DiscardUnknown ¶
func (m *AddPeerAddressReq) XXX_DiscardUnknown()
func (*AddPeerAddressReq) XXX_Marshal ¶
func (m *AddPeerAddressReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AddPeerAddressReq) XXX_Merge ¶
func (dst *AddPeerAddressReq) XXX_Merge(src proto.Message)
func (*AddPeerAddressReq) XXX_Size ¶
func (m *AddPeerAddressReq) XXX_Size() int
func (*AddPeerAddressReq) XXX_Unmarshal ¶
func (m *AddPeerAddressReq) XXX_Unmarshal(b []byte) error
type Address ¶
type Address struct { Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The address message containing a multiaddress.
func (*Address) Descriptor ¶
func (*Address) GetAddress ¶
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) XXX_DiscardUnknown ¶
func (m *Address) XXX_DiscardUnknown()
func (*Address) XXX_Marshal ¶
func (*Address) XXX_Unmarshal ¶
type AddressesReq ¶
type AddressesReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The address request message.
func (*AddressesReq) Descriptor ¶
func (*AddressesReq) Descriptor() ([]byte, []int)
func (*AddressesReq) Marshal ¶
func (m *AddressesReq) Marshal() (dAtA []byte, err error)
func (*AddressesReq) ProtoMessage ¶
func (*AddressesReq) ProtoMessage()
func (*AddressesReq) Reset ¶
func (m *AddressesReq) Reset()
func (*AddressesReq) Size ¶
func (m *AddressesReq) Size() (n int)
func (*AddressesReq) String ¶
func (m *AddressesReq) String() string
func (*AddressesReq) Unmarshal ¶
func (m *AddressesReq) Unmarshal(dAtA []byte) error
func (*AddressesReq) XXX_DiscardUnknown ¶
func (m *AddressesReq) XXX_DiscardUnknown()
func (*AddressesReq) XXX_Marshal ¶
func (m *AddressesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AddressesReq) XXX_Merge ¶
func (dst *AddressesReq) XXX_Merge(src proto.Message)
func (*AddressesReq) XXX_Size ¶
func (m *AddressesReq) XXX_Size() int
func (*AddressesReq) XXX_Unmarshal ¶
func (m *AddressesReq) XXX_Unmarshal(b []byte) error
type ConnectReq ¶
type ConnectReq struct { Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The connect request message.
func (*ConnectReq) Descriptor ¶
func (*ConnectReq) Descriptor() ([]byte, []int)
func (*ConnectReq) GetAddress ¶
func (m *ConnectReq) GetAddress() []byte
func (*ConnectReq) Marshal ¶
func (m *ConnectReq) Marshal() (dAtA []byte, err error)
func (*ConnectReq) ProtoMessage ¶
func (*ConnectReq) ProtoMessage()
func (*ConnectReq) Reset ¶
func (m *ConnectReq) Reset()
func (*ConnectReq) Size ¶
func (m *ConnectReq) Size() (n int)
func (*ConnectReq) String ¶
func (m *ConnectReq) String() string
func (*ConnectReq) Unmarshal ¶
func (m *ConnectReq) Unmarshal(dAtA []byte) error
func (*ConnectReq) XXX_DiscardUnknown ¶
func (m *ConnectReq) XXX_DiscardUnknown()
func (*ConnectReq) XXX_Marshal ¶
func (m *ConnectReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConnectReq) XXX_Merge ¶
func (dst *ConnectReq) XXX_Merge(src proto.Message)
func (*ConnectReq) XXX_Size ¶
func (m *ConnectReq) XXX_Size() int
func (*ConnectReq) XXX_Unmarshal ¶
func (m *ConnectReq) XXX_Unmarshal(b []byte) error
type Connection ¶
type Connection struct { PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` LocalAddress []byte `protobuf:"bytes,2,opt,name=local_address,json=localAddress,proto3" json:"local_address,omitempty"` RemoteAddress []byte `protobuf:"bytes,3,opt,name=remote_address,json=remoteAddress,proto3" json:"remote_address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The connection message containing the peer ID and addresses.
func (*Connection) Descriptor ¶
func (*Connection) Descriptor() ([]byte, []int)
func (*Connection) GetLocalAddress ¶
func (m *Connection) GetLocalAddress() []byte
func (*Connection) GetPeerId ¶
func (m *Connection) GetPeerId() []byte
func (*Connection) GetRemoteAddress ¶
func (m *Connection) GetRemoteAddress() []byte
func (*Connection) Marshal ¶
func (m *Connection) Marshal() (dAtA []byte, err error)
func (*Connection) ProtoMessage ¶
func (*Connection) ProtoMessage()
func (*Connection) Reset ¶
func (m *Connection) Reset()
func (*Connection) Size ¶
func (m *Connection) Size() (n int)
func (*Connection) String ¶
func (m *Connection) String() string
func (*Connection) Unmarshal ¶
func (m *Connection) Unmarshal(dAtA []byte) error
func (*Connection) XXX_DiscardUnknown ¶
func (m *Connection) XXX_DiscardUnknown()
func (*Connection) XXX_Marshal ¶
func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Connection) XXX_Merge ¶
func (dst *Connection) XXX_Merge(src proto.Message)
func (*Connection) XXX_Size ¶
func (m *Connection) XXX_Size() int
func (*Connection) XXX_Unmarshal ¶
func (m *Connection) XXX_Unmarshal(b []byte) error
type HostClient ¶
type HostClient interface { // Returns the host ID. ID(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*PeerId, error) // Streams the host addresses. Addresses(ctx context.Context, in *AddressesReq, opts ...grpc.CallOption) (Host_AddressesClient, error) // Streams a peer's known addresses. PeerAddresses(ctx context.Context, in *PeerAddressesReq, opts ...grpc.CallOption) (Host_PeerAddressesClient, error) // Clears a peer's known addresses. ClearPeerAddresses(ctx context.Context, in *PeerAddressesReq, opts ...grpc.CallOption) (Host_ClearPeerAddressesClient, error) // Add a new peer address to the node's Peer Store. AddPeerAddress(ctx context.Context, in *AddPeerAddressReq, opts ...grpc.CallOption) (*PeerId, error) // Connects to a multiaddress. Connect(ctx context.Context, in *ConnectReq, opts ...grpc.CallOption) (Host_ConnectClient, error) }
func NewHostClient ¶
func NewHostClient(cc *grpc.ClientConn) HostClient
type HostServer ¶
type HostServer interface { // Returns the host ID. ID(context.Context, *IdReq) (*PeerId, error) // Streams the host addresses. Addresses(*AddressesReq, Host_AddressesServer) error // Streams a peer's known addresses. PeerAddresses(*PeerAddressesReq, Host_PeerAddressesServer) error // Clears a peer's known addresses. ClearPeerAddresses(*PeerAddressesReq, Host_ClearPeerAddressesServer) error // Add a new peer address to the node's Peer Store. AddPeerAddress(context.Context, *AddPeerAddressReq) (*PeerId, error) // Connects to a multiaddress. Connect(*ConnectReq, Host_ConnectServer) error }
type Host_AddressesClient ¶
type Host_AddressesClient interface { Recv() (*Address, error) grpc.ClientStream }
type Host_AddressesServer ¶
type Host_AddressesServer interface { Send(*Address) error grpc.ServerStream }
type Host_ClearPeerAddressesClient ¶ added in v0.2.0
type Host_ClearPeerAddressesClient interface { Recv() (*Address, error) grpc.ClientStream }
type Host_ClearPeerAddressesServer ¶ added in v0.2.0
type Host_ClearPeerAddressesServer interface { Send(*Address) error grpc.ServerStream }
type Host_ConnectClient ¶
type Host_ConnectClient interface { Recv() (*Connection, error) grpc.ClientStream }
type Host_ConnectServer ¶
type Host_ConnectServer interface { Send(*Connection) error grpc.ServerStream }
type Host_PeerAddressesClient ¶
type Host_PeerAddressesClient interface { Recv() (*Address, error) grpc.ClientStream }
type Host_PeerAddressesServer ¶
type Host_PeerAddressesServer interface { Send(*Address) error grpc.ServerStream }
type IdReq ¶
type IdReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The ID request message.
func (*IdReq) Descriptor ¶
func (*IdReq) ProtoMessage ¶
func (*IdReq) ProtoMessage()
func (*IdReq) XXX_DiscardUnknown ¶
func (m *IdReq) XXX_DiscardUnknown()
func (*IdReq) XXX_Marshal ¶
func (*IdReq) XXX_Unmarshal ¶
type PeerAddressesReq ¶
type PeerAddressesReq struct { PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The peer addresses request message.
func (*PeerAddressesReq) Descriptor ¶
func (*PeerAddressesReq) Descriptor() ([]byte, []int)
func (*PeerAddressesReq) GetPeerId ¶
func (m *PeerAddressesReq) GetPeerId() []byte
func (*PeerAddressesReq) Marshal ¶
func (m *PeerAddressesReq) Marshal() (dAtA []byte, err error)
func (*PeerAddressesReq) ProtoMessage ¶
func (*PeerAddressesReq) ProtoMessage()
func (*PeerAddressesReq) Reset ¶
func (m *PeerAddressesReq) Reset()
func (*PeerAddressesReq) Size ¶
func (m *PeerAddressesReq) Size() (n int)
func (*PeerAddressesReq) String ¶
func (m *PeerAddressesReq) String() string
func (*PeerAddressesReq) Unmarshal ¶
func (m *PeerAddressesReq) Unmarshal(dAtA []byte) error
func (*PeerAddressesReq) XXX_DiscardUnknown ¶
func (m *PeerAddressesReq) XXX_DiscardUnknown()
func (*PeerAddressesReq) XXX_Marshal ¶
func (m *PeerAddressesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PeerAddressesReq) XXX_Merge ¶
func (dst *PeerAddressesReq) XXX_Merge(src proto.Message)
func (*PeerAddressesReq) XXX_Size ¶
func (m *PeerAddressesReq) XXX_Size() int
func (*PeerAddressesReq) XXX_Unmarshal ¶
func (m *PeerAddressesReq) XXX_Unmarshal(b []byte) error
type PeerId ¶
type PeerId struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The peer ID message containing the ID of a peer.
func (*PeerId) Descriptor ¶
func (*PeerId) ProtoMessage ¶
func (*PeerId) ProtoMessage()
func (*PeerId) XXX_DiscardUnknown ¶
func (m *PeerId) XXX_DiscardUnknown()
func (*PeerId) XXX_Marshal ¶
func (*PeerId) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.