Documentation ¶
Overview ¶
Package discoverynetwork is a generated protocol buffer package.
It is generated from these files:
discoverynetwork/discovery.proto
It has these top-level messages:
EmptyMessage DisconnectRequest JoinRequest JoinResponse Node
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDiscoveryNetworkServer ¶
func RegisterDiscoveryNetworkServer(s *grpc.Server, srv DiscoveryNetworkServer)
Types ¶
type DisconnectRequest ¶
type DisconnectRequest struct { Pool string `protobuf:"bytes,1,opt,name=pool" json:"pool,omitempty"` Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` Node *Node `protobuf:"bytes,3,opt,name=node" json:"node,omitempty"` }
func (*DisconnectRequest) Descriptor ¶
func (*DisconnectRequest) Descriptor() ([]byte, []int)
func (*DisconnectRequest) GetNode ¶
func (m *DisconnectRequest) GetNode() *Node
func (*DisconnectRequest) ProtoMessage ¶
func (*DisconnectRequest) ProtoMessage()
func (*DisconnectRequest) Reset ¶
func (m *DisconnectRequest) Reset()
func (*DisconnectRequest) String ¶
func (m *DisconnectRequest) String() string
type DiscoveryNetworkClient ¶
type DiscoveryNetworkClient interface { // Discovery Calls Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (*JoinResponse, error) Disconnect(ctx context.Context, in *DisconnectRequest, opts ...grpc.CallOption) (*EmptyMessage, error) }
func NewDiscoveryNetworkClient ¶
func NewDiscoveryNetworkClient(cc *grpc.ClientConn) DiscoveryNetworkClient
type DiscoveryNetworkServer ¶
type DiscoveryNetworkServer interface { // Discovery Calls Join(context.Context, *JoinRequest) (*JoinResponse, error) Disconnect(context.Context, *DisconnectRequest) (*EmptyMessage, error) }
type EmptyMessage ¶
type EmptyMessage struct { }
func (*EmptyMessage) Descriptor ¶
func (*EmptyMessage) Descriptor() ([]byte, []int)
func (*EmptyMessage) ProtoMessage ¶
func (*EmptyMessage) ProtoMessage()
func (*EmptyMessage) Reset ¶
func (m *EmptyMessage) Reset()
func (*EmptyMessage) String ¶
func (m *EmptyMessage) String() string
type JoinRequest ¶
type JoinRequest struct { Pool string `protobuf:"bytes,1,opt,name=pool" json:"pool,omitempty"` Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` Node *Node `protobuf:"bytes,3,opt,name=node" json:"node,omitempty"` }
func (*JoinRequest) Descriptor ¶
func (*JoinRequest) Descriptor() ([]byte, []int)
func (*JoinRequest) GetNode ¶
func (m *JoinRequest) GetNode() *Node
func (*JoinRequest) ProtoMessage ¶
func (*JoinRequest) ProtoMessage()
func (*JoinRequest) Reset ¶
func (m *JoinRequest) Reset()
func (*JoinRequest) String ¶
func (m *JoinRequest) String() string
type JoinResponse ¶
type JoinResponse struct { // The time after which the server will remove the node from the list // if the node doesn't make the Renew RPC call ResetInterval int64 `protobuf:"varint,1,opt,name=reset_interval,json=resetInterval" json:"reset_interval,omitempty"` Nodes []*Node `protobuf:"bytes,2,rep,name=nodes" json:"nodes,omitempty"` }
func (*JoinResponse) Descriptor ¶
func (*JoinResponse) Descriptor() ([]byte, []int)
func (*JoinResponse) GetNodes ¶
func (m *JoinResponse) GetNodes() []*Node
func (*JoinResponse) ProtoMessage ¶
func (*JoinResponse) ProtoMessage()
func (*JoinResponse) Reset ¶
func (m *JoinResponse) Reset()
func (*JoinResponse) String ¶
func (m *JoinResponse) String() string
type Node ¶
type Node struct { Ip string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"` Port string `protobuf:"bytes,2,opt,name=port" json:"port,omitempty"` CommonName string `protobuf:"bytes,3,opt,name=common_name,json=commonName" json:"common_name,omitempty"` Uuid string `protobuf:"bytes,4,opt,name=uuid" json:"uuid,omitempty"` }
func (*Node) Descriptor ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.