2018-11-24 02:46:53 +00:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
2018-11-09 18:40:15 +00:00
|
|
|
// source: overlay.proto
|
2018-08-01 15:15:38 +01:00
|
|
|
|
2018-09-18 05:39:06 +01:00
|
|
|
package pb
|
2018-05-01 18:24:32 +01:00
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
2018-05-01 18:24:32 +01:00
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
2018-08-01 15:15:38 +01:00
|
|
|
import duration "github.com/golang/protobuf/ptypes/duration"
|
2018-05-01 18:24:32 +01:00
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
import context "golang.org/x/net/context"
|
|
|
|
import grpc "google.golang.org/grpc"
|
2018-05-01 18:24:32 +01:00
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
2018-11-24 02:46:53 +00:00
|
|
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
2018-05-01 18:24:32 +01:00
|
|
|
|
|
|
|
// NodeTransport is an enum of possible transports for the overlay network
|
|
|
|
type NodeTransport int32
|
|
|
|
|
|
|
|
const (
|
2018-10-15 13:04:21 +01:00
|
|
|
NodeTransport_TCP_TLS_GRPC NodeTransport = 0
|
2018-05-01 18:24:32 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
var NodeTransport_name = map[int32]string{
|
2018-10-15 13:04:21 +01:00
|
|
|
0: "TCP_TLS_GRPC",
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
var NodeTransport_value = map[string]int32{
|
2018-10-15 13:04:21 +01:00
|
|
|
"TCP_TLS_GRPC": 0,
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x NodeTransport) String() string {
|
|
|
|
return proto.EnumName(NodeTransport_name, int32(x))
|
|
|
|
}
|
2018-08-01 15:15:38 +01:00
|
|
|
func (NodeTransport) EnumDescriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{0}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
|
2018-08-17 20:11:46 +01:00
|
|
|
// NodeType is an enum of possible node types
|
2018-08-01 15:15:38 +01:00
|
|
|
type NodeType int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
NodeType_ADMIN NodeType = 0
|
|
|
|
NodeType_STORAGE NodeType = 1
|
|
|
|
)
|
|
|
|
|
|
|
|
var NodeType_name = map[int32]string{
|
|
|
|
0: "ADMIN",
|
|
|
|
1: "STORAGE",
|
|
|
|
}
|
|
|
|
var NodeType_value = map[string]int32{
|
|
|
|
"ADMIN": 0,
|
|
|
|
"STORAGE": 1,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x NodeType) String() string {
|
|
|
|
return proto.EnumName(NodeType_name, int32(x))
|
|
|
|
}
|
|
|
|
func (NodeType) EnumDescriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{1}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type Restriction_Operator int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
Restriction_LT Restriction_Operator = 0
|
|
|
|
Restriction_EQ Restriction_Operator = 1
|
|
|
|
Restriction_GT Restriction_Operator = 2
|
|
|
|
Restriction_LTE Restriction_Operator = 3
|
|
|
|
Restriction_GTE Restriction_Operator = 4
|
|
|
|
)
|
|
|
|
|
|
|
|
var Restriction_Operator_name = map[int32]string{
|
|
|
|
0: "LT",
|
|
|
|
1: "EQ",
|
|
|
|
2: "GT",
|
|
|
|
3: "LTE",
|
|
|
|
4: "GTE",
|
|
|
|
}
|
|
|
|
var Restriction_Operator_value = map[string]int32{
|
|
|
|
"LT": 0,
|
|
|
|
"EQ": 1,
|
|
|
|
"GT": 2,
|
|
|
|
"LTE": 3,
|
|
|
|
"GTE": 4,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x Restriction_Operator) String() string {
|
|
|
|
return proto.EnumName(Restriction_Operator_name, int32(x))
|
|
|
|
}
|
|
|
|
func (Restriction_Operator) EnumDescriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{16, 0}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type Restriction_Operand int32
|
|
|
|
|
|
|
|
const (
|
2018-11-24 02:46:53 +00:00
|
|
|
Restriction_FREE_BANDWIDTH Restriction_Operand = 0
|
|
|
|
Restriction_FREE_DISK Restriction_Operand = 1
|
2018-08-01 15:15:38 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
var Restriction_Operand_name = map[int32]string{
|
2018-11-24 02:46:53 +00:00
|
|
|
0: "FREE_BANDWIDTH",
|
|
|
|
1: "FREE_DISK",
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
var Restriction_Operand_value = map[string]int32{
|
2018-11-24 02:46:53 +00:00
|
|
|
"FREE_BANDWIDTH": 0,
|
|
|
|
"FREE_DISK": 1,
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x Restriction_Operand) String() string {
|
|
|
|
return proto.EnumName(Restriction_Operand_name, int32(x))
|
|
|
|
}
|
|
|
|
func (Restriction_Operand) EnumDescriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{16, 1}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
2018-05-01 18:24:32 +01:00
|
|
|
|
|
|
|
// LookupRequest is is request message for the lookup rpc call
|
|
|
|
type LookupRequest struct {
|
2018-08-03 14:15:52 +01:00
|
|
|
NodeID string `protobuf:"bytes,1,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *LookupRequest) Reset() { *m = LookupRequest{} }
|
|
|
|
func (m *LookupRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*LookupRequest) ProtoMessage() {}
|
|
|
|
func (*LookupRequest) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{0}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *LookupRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_LookupRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *LookupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_LookupRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *LookupRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_LookupRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *LookupRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_LookupRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *LookupRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_LookupRequest.DiscardUnknown(m)
|
2018-07-19 15:48:08 +01:00
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
var xxx_messageInfo_LookupRequest proto.InternalMessageInfo
|
2018-05-01 18:24:32 +01:00
|
|
|
|
|
|
|
func (m *LookupRequest) GetNodeID() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.NodeID
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// LookupResponse is is response message for the lookup rpc call
|
|
|
|
type LookupResponse struct {
|
2018-11-24 02:46:53 +00:00
|
|
|
Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *LookupResponse) Reset() { *m = LookupResponse{} }
|
|
|
|
func (m *LookupResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*LookupResponse) ProtoMessage() {}
|
|
|
|
func (*LookupResponse) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{1}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *LookupResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_LookupResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *LookupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_LookupResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *LookupResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_LookupResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *LookupResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_LookupResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *LookupResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_LookupResponse.DiscardUnknown(m)
|
2018-07-19 15:48:08 +01:00
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
var xxx_messageInfo_LookupResponse proto.InternalMessageInfo
|
2018-05-01 18:24:32 +01:00
|
|
|
|
2018-06-19 15:00:15 +01:00
|
|
|
func (m *LookupResponse) GetNode() *Node {
|
2018-05-01 18:24:32 +01:00
|
|
|
if m != nil {
|
2018-06-19 15:00:15 +01:00
|
|
|
return m.Node
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-09-11 05:52:14 +01:00
|
|
|
// LookupRequests is a list of LookupRequest
|
|
|
|
type LookupRequests struct {
|
2018-11-24 02:46:53 +00:00
|
|
|
LookupRequest []*LookupRequest `protobuf:"bytes,1,rep,name=lookup_request,json=lookupRequest" json:"lookup_request,omitempty"`
|
2018-09-11 05:52:14 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *LookupRequests) Reset() { *m = LookupRequests{} }
|
|
|
|
func (m *LookupRequests) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*LookupRequests) ProtoMessage() {}
|
|
|
|
func (*LookupRequests) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{2}
|
2018-09-11 05:52:14 +01:00
|
|
|
}
|
|
|
|
func (m *LookupRequests) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_LookupRequests.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *LookupRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_LookupRequests.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *LookupRequests) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_LookupRequests.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *LookupRequests) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_LookupRequests.Size(m)
|
|
|
|
}
|
|
|
|
func (m *LookupRequests) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_LookupRequests.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_LookupRequests proto.InternalMessageInfo
|
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
func (m *LookupRequests) GetLookupRequest() []*LookupRequest {
|
2018-09-11 05:52:14 +01:00
|
|
|
if m != nil {
|
2018-11-24 02:46:53 +00:00
|
|
|
return m.LookupRequest
|
2018-09-11 05:52:14 +01:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// LookupResponse is a list of LookupResponse
|
|
|
|
type LookupResponses struct {
|
2018-11-24 02:46:53 +00:00
|
|
|
LookupResponse []*LookupResponse `protobuf:"bytes,1,rep,name=lookup_response,json=lookupResponse" json:"lookup_response,omitempty"`
|
2018-09-11 05:52:14 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *LookupResponses) Reset() { *m = LookupResponses{} }
|
|
|
|
func (m *LookupResponses) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*LookupResponses) ProtoMessage() {}
|
|
|
|
func (*LookupResponses) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{3}
|
2018-09-11 05:52:14 +01:00
|
|
|
}
|
|
|
|
func (m *LookupResponses) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_LookupResponses.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *LookupResponses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_LookupResponses.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *LookupResponses) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_LookupResponses.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *LookupResponses) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_LookupResponses.Size(m)
|
|
|
|
}
|
|
|
|
func (m *LookupResponses) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_LookupResponses.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_LookupResponses proto.InternalMessageInfo
|
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
func (m *LookupResponses) GetLookupResponse() []*LookupResponse {
|
2018-09-11 05:52:14 +01:00
|
|
|
if m != nil {
|
2018-11-24 02:46:53 +00:00
|
|
|
return m.LookupResponse
|
2018-09-11 05:52:14 +01:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-05-01 18:24:32 +01:00
|
|
|
// FindStorageNodesResponse is is response message for the FindStorageNodes rpc call
|
|
|
|
type FindStorageNodesResponse struct {
|
2018-11-24 02:46:53 +00:00
|
|
|
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-07-19 15:48:08 +01:00
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
func (m *FindStorageNodesResponse) Reset() { *m = FindStorageNodesResponse{} }
|
|
|
|
func (m *FindStorageNodesResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*FindStorageNodesResponse) ProtoMessage() {}
|
|
|
|
func (*FindStorageNodesResponse) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{4}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *FindStorageNodesResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_FindStorageNodesResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *FindStorageNodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_FindStorageNodesResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *FindStorageNodesResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_FindStorageNodesResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *FindStorageNodesResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_FindStorageNodesResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *FindStorageNodesResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_FindStorageNodesResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_FindStorageNodesResponse proto.InternalMessageInfo
|
2018-05-01 18:24:32 +01:00
|
|
|
|
2018-06-19 15:00:15 +01:00
|
|
|
func (m *FindStorageNodesResponse) GetNodes() []*Node {
|
2018-05-01 18:24:32 +01:00
|
|
|
if m != nil {
|
2018-06-19 15:00:15 +01:00
|
|
|
return m.Nodes
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// FindStorageNodesRequest is is request message for the FindStorageNodes rpc call
|
|
|
|
type FindStorageNodesRequest struct {
|
2018-11-24 02:46:53 +00:00
|
|
|
ObjectSize int64 `protobuf:"varint,1,opt,name=object_size,json=objectSize,proto3" json:"object_size,omitempty"`
|
|
|
|
ContractLength *duration.Duration `protobuf:"bytes,2,opt,name=contract_length,json=contractLength" json:"contract_length,omitempty"`
|
|
|
|
Opts *OverlayOptions `protobuf:"bytes,3,opt,name=opts" json:"opts,omitempty"`
|
2018-11-02 18:50:28 +00:00
|
|
|
Start []byte `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"`
|
2018-11-24 02:46:53 +00:00
|
|
|
MaxNodes int64 `protobuf:"varint,5,opt,name=max_nodes,json=maxNodes,proto3" json:"max_nodes,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FindStorageNodesRequest) Reset() { *m = FindStorageNodesRequest{} }
|
|
|
|
func (m *FindStorageNodesRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*FindStorageNodesRequest) ProtoMessage() {}
|
|
|
|
func (*FindStorageNodesRequest) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{5}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *FindStorageNodesRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_FindStorageNodesRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *FindStorageNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_FindStorageNodesRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *FindStorageNodesRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_FindStorageNodesRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *FindStorageNodesRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_FindStorageNodesRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *FindStorageNodesRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_FindStorageNodesRequest.DiscardUnknown(m)
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
var xxx_messageInfo_FindStorageNodesRequest proto.InternalMessageInfo
|
2018-05-01 18:24:32 +01:00
|
|
|
|
|
|
|
func (m *FindStorageNodesRequest) GetObjectSize() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.ObjectSize
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
func (m *FindStorageNodesRequest) GetContractLength() *duration.Duration {
|
2018-05-01 18:24:32 +01:00
|
|
|
if m != nil {
|
|
|
|
return m.ContractLength
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FindStorageNodesRequest) GetOpts() *OverlayOptions {
|
|
|
|
if m != nil {
|
|
|
|
return m.Opts
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-11-02 18:50:28 +00:00
|
|
|
func (m *FindStorageNodesRequest) GetStart() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Start
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FindStorageNodesRequest) GetMaxNodes() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.MaxNodes
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-05-01 18:24:32 +01:00
|
|
|
// NodeAddress contains the information needed to communicate with a node on the network
|
|
|
|
type NodeAddress struct {
|
2018-08-03 14:15:52 +01:00
|
|
|
Transport NodeTransport `protobuf:"varint,1,opt,name=transport,proto3,enum=overlay.NodeTransport" json:"transport,omitempty"`
|
|
|
|
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
func (m *NodeAddress) Reset() { *m = NodeAddress{} }
|
|
|
|
func (m *NodeAddress) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*NodeAddress) ProtoMessage() {}
|
|
|
|
func (*NodeAddress) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{6}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *NodeAddress) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_NodeAddress.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *NodeAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_NodeAddress.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *NodeAddress) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_NodeAddress.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *NodeAddress) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_NodeAddress.Size(m)
|
|
|
|
}
|
|
|
|
func (m *NodeAddress) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_NodeAddress.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_NodeAddress proto.InternalMessageInfo
|
2018-05-01 18:24:32 +01:00
|
|
|
|
|
|
|
func (m *NodeAddress) GetTransport() NodeTransport {
|
|
|
|
if m != nil {
|
|
|
|
return m.Transport
|
|
|
|
}
|
2018-10-15 13:04:21 +01:00
|
|
|
return NodeTransport_TCP_TLS_GRPC
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NodeAddress) GetAddress() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Address
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// OverlayOptions is a set of criteria that a node must meet to be considered for a storage opportunity
|
|
|
|
type OverlayOptions struct {
|
2018-11-24 02:46:53 +00:00
|
|
|
MaxLatency *duration.Duration `protobuf:"bytes,1,opt,name=max_latency,json=maxLatency" json:"max_latency,omitempty"`
|
|
|
|
MinReputation *NodeRep `protobuf:"bytes,2,opt,name=min_reputation,json=minReputation" json:"min_reputation,omitempty"`
|
|
|
|
MinSpeedKbps int64 `protobuf:"varint,3,opt,name=min_speed_kbps,json=minSpeedKbps,proto3" json:"min_speed_kbps,omitempty"`
|
2018-08-03 14:15:52 +01:00
|
|
|
Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
|
2018-11-24 02:46:53 +00:00
|
|
|
Restrictions *NodeRestrictions `protobuf:"bytes,5,opt,name=restrictions" json:"restrictions,omitempty"`
|
|
|
|
ExcludedNodes []string `protobuf:"bytes,6,rep,name=excluded_nodes,json=excludedNodes" json:"excluded_nodes,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OverlayOptions) Reset() { *m = OverlayOptions{} }
|
|
|
|
func (m *OverlayOptions) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*OverlayOptions) ProtoMessage() {}
|
|
|
|
func (*OverlayOptions) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{7}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *OverlayOptions) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_OverlayOptions.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *OverlayOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_OverlayOptions.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *OverlayOptions) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_OverlayOptions.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *OverlayOptions) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_OverlayOptions.Size(m)
|
|
|
|
}
|
|
|
|
func (m *OverlayOptions) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_OverlayOptions.DiscardUnknown(m)
|
2018-07-19 15:48:08 +01:00
|
|
|
}
|
2018-05-01 18:24:32 +01:00
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
var xxx_messageInfo_OverlayOptions proto.InternalMessageInfo
|
2018-07-19 15:48:08 +01:00
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
func (m *OverlayOptions) GetMaxLatency() *duration.Duration {
|
2018-05-01 18:24:32 +01:00
|
|
|
if m != nil {
|
|
|
|
return m.MaxLatency
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OverlayOptions) GetMinReputation() *NodeRep {
|
|
|
|
if m != nil {
|
|
|
|
return m.MinReputation
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OverlayOptions) GetMinSpeedKbps() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.MinSpeedKbps
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-08-03 14:15:52 +01:00
|
|
|
func (m *OverlayOptions) GetAmount() int64 {
|
2018-06-19 15:00:15 +01:00
|
|
|
if m != nil {
|
2018-08-03 14:15:52 +01:00
|
|
|
return m.Amount
|
2018-06-19 15:00:15 +01:00
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
func (m *OverlayOptions) GetRestrictions() *NodeRestrictions {
|
|
|
|
if m != nil {
|
|
|
|
return m.Restrictions
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-15 18:42:36 +01:00
|
|
|
func (m *OverlayOptions) GetExcludedNodes() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.ExcludedNodes
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-05-01 18:24:32 +01:00
|
|
|
// NodeRep is the reputation characteristics of a node
|
|
|
|
type NodeRep struct {
|
2018-11-24 02:46:53 +00:00
|
|
|
UptimeRatio float32 `protobuf:"fixed32,1,opt,name=uptime_ratio,json=uptimeRatio,proto3" json:"uptime_ratio,omitempty"`
|
|
|
|
AuditSuccessRatio float32 `protobuf:"fixed32,2,opt,name=audit_success_ratio,json=auditSuccessRatio,proto3" json:"audit_success_ratio,omitempty"`
|
|
|
|
AuditCount int64 `protobuf:"varint,3,opt,name=audit_count,json=auditCount,proto3" json:"audit_count,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
func (m *NodeRep) Reset() { *m = NodeRep{} }
|
|
|
|
func (m *NodeRep) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*NodeRep) ProtoMessage() {}
|
|
|
|
func (*NodeRep) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{8}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *NodeRep) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_NodeRep.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *NodeRep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_NodeRep.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *NodeRep) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_NodeRep.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *NodeRep) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_NodeRep.Size(m)
|
|
|
|
}
|
|
|
|
func (m *NodeRep) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_NodeRep.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_NodeRep proto.InternalMessageInfo
|
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
func (m *NodeRep) GetUptimeRatio() float32 {
|
2018-10-30 17:11:22 +00:00
|
|
|
if m != nil {
|
2018-11-24 02:46:53 +00:00
|
|
|
return m.UptimeRatio
|
2018-10-30 17:11:22 +00:00
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
func (m *NodeRep) GetAuditSuccessRatio() float32 {
|
2018-10-30 17:11:22 +00:00
|
|
|
if m != nil {
|
2018-11-24 02:46:53 +00:00
|
|
|
return m.AuditSuccessRatio
|
2018-10-30 17:11:22 +00:00
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
func (m *NodeRep) GetAuditCount() int64 {
|
2018-10-30 17:11:22 +00:00
|
|
|
if m != nil {
|
2018-11-24 02:46:53 +00:00
|
|
|
return m.AuditCount
|
2018-10-30 17:11:22 +00:00
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
// NodeRestrictions contains all relevant data about a nodes ability to store data
|
|
|
|
type NodeRestrictions struct {
|
2018-11-24 02:46:53 +00:00
|
|
|
FreeBandwidth int64 `protobuf:"varint,1,opt,name=free_bandwidth,json=freeBandwidth,proto3" json:"free_bandwidth,omitempty"`
|
|
|
|
FreeDisk int64 `protobuf:"varint,2,opt,name=free_disk,json=freeDisk,proto3" json:"free_disk,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NodeRestrictions) Reset() { *m = NodeRestrictions{} }
|
|
|
|
func (m *NodeRestrictions) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*NodeRestrictions) ProtoMessage() {}
|
|
|
|
func (*NodeRestrictions) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{9}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *NodeRestrictions) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_NodeRestrictions.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *NodeRestrictions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_NodeRestrictions.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *NodeRestrictions) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_NodeRestrictions.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *NodeRestrictions) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_NodeRestrictions.Size(m)
|
|
|
|
}
|
|
|
|
func (m *NodeRestrictions) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_NodeRestrictions.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_NodeRestrictions proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *NodeRestrictions) GetFreeBandwidth() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.FreeBandwidth
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NodeRestrictions) GetFreeDisk() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.FreeDisk
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
2018-05-01 18:24:32 +01:00
|
|
|
|
|
|
|
// Node represents a node in the overlay network
|
|
|
|
type Node struct {
|
2018-08-03 14:15:52 +01:00
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
2018-11-24 02:46:53 +00:00
|
|
|
Address *NodeAddress `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`
|
2018-08-03 14:15:52 +01:00
|
|
|
Type NodeType `protobuf:"varint,3,opt,name=type,proto3,enum=overlay.NodeType" json:"type,omitempty"`
|
2018-11-24 02:46:53 +00:00
|
|
|
Restrictions *NodeRestrictions `protobuf:"bytes,4,opt,name=restrictions" json:"restrictions,omitempty"`
|
|
|
|
Metadata *NodeMetadata `protobuf:"bytes,5,opt,name=metadata" json:"metadata,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Node) Reset() { *m = Node{} }
|
|
|
|
func (m *Node) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Node) ProtoMessage() {}
|
|
|
|
func (*Node) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{10}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *Node) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Node.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Node.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *Node) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Node.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *Node) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Node.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Node) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Node.DiscardUnknown(m)
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
var xxx_messageInfo_Node proto.InternalMessageInfo
|
2018-05-01 18:24:32 +01:00
|
|
|
|
|
|
|
func (m *Node) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Node) GetAddress() *NodeAddress {
|
|
|
|
if m != nil {
|
|
|
|
return m.Address
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
func (m *Node) GetType() NodeType {
|
|
|
|
if m != nil {
|
|
|
|
return m.Type
|
|
|
|
}
|
|
|
|
return NodeType_ADMIN
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Node) GetRestrictions() *NodeRestrictions {
|
|
|
|
if m != nil {
|
|
|
|
return m.Restrictions
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-11-21 15:07:18 +00:00
|
|
|
func (m *Node) GetMetadata() *NodeMetadata {
|
|
|
|
if m != nil {
|
|
|
|
return m.Metadata
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type NodeMetadata struct {
|
|
|
|
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
|
|
|
Wallet string `protobuf:"bytes,2,opt,name=wallet,proto3" json:"wallet,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NodeMetadata) Reset() { *m = NodeMetadata{} }
|
|
|
|
func (m *NodeMetadata) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*NodeMetadata) ProtoMessage() {}
|
|
|
|
func (*NodeMetadata) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{11}
|
2018-11-21 15:07:18 +00:00
|
|
|
}
|
|
|
|
func (m *NodeMetadata) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_NodeMetadata.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *NodeMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_NodeMetadata.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *NodeMetadata) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_NodeMetadata.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *NodeMetadata) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_NodeMetadata.Size(m)
|
|
|
|
}
|
|
|
|
func (m *NodeMetadata) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_NodeMetadata.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_NodeMetadata proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *NodeMetadata) GetEmail() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Email
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NodeMetadata) GetWallet() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Wallet
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-19 15:48:08 +01:00
|
|
|
type QueryRequest struct {
|
2018-11-24 02:46:53 +00:00
|
|
|
Sender *Node `protobuf:"bytes,1,opt,name=sender" json:"sender,omitempty"`
|
|
|
|
Target *Node `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"`
|
2018-08-23 16:20:11 +01:00
|
|
|
Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
|
2018-10-08 16:09:37 +01:00
|
|
|
Pingback bool `protobuf:"varint,4,opt,name=pingback,proto3" json:"pingback,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-07-19 15:48:08 +01:00
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
func (m *QueryRequest) Reset() { *m = QueryRequest{} }
|
|
|
|
func (m *QueryRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*QueryRequest) ProtoMessage() {}
|
|
|
|
func (*QueryRequest) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{12}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *QueryRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_QueryRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_QueryRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *QueryRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_QueryRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *QueryRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_QueryRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *QueryRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_QueryRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_QueryRequest proto.InternalMessageInfo
|
2018-07-19 15:48:08 +01:00
|
|
|
|
|
|
|
func (m *QueryRequest) GetSender() *Node {
|
|
|
|
if m != nil {
|
|
|
|
return m.Sender
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-08-23 16:20:11 +01:00
|
|
|
func (m *QueryRequest) GetTarget() *Node {
|
2018-07-19 15:48:08 +01:00
|
|
|
if m != nil {
|
2018-08-23 16:20:11 +01:00
|
|
|
return m.Target
|
2018-07-19 15:48:08 +01:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-08-23 16:20:11 +01:00
|
|
|
func (m *QueryRequest) GetLimit() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Limit
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-10-08 16:09:37 +01:00
|
|
|
func (m *QueryRequest) GetPingback() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.Pingback
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2018-07-19 15:48:08 +01:00
|
|
|
type QueryResponse struct {
|
2018-11-24 02:46:53 +00:00
|
|
|
Sender *Node `protobuf:"bytes,1,opt,name=sender" json:"sender,omitempty"`
|
|
|
|
Response []*Node `protobuf:"bytes,2,rep,name=response" json:"response,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryResponse) Reset() { *m = QueryResponse{} }
|
|
|
|
func (m *QueryResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*QueryResponse) ProtoMessage() {}
|
|
|
|
func (*QueryResponse) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{13}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *QueryResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_QueryResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_QueryResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *QueryResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_QueryResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *QueryResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_QueryResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *QueryResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_QueryResponse.DiscardUnknown(m)
|
2018-07-19 15:48:08 +01:00
|
|
|
}
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
var xxx_messageInfo_QueryResponse proto.InternalMessageInfo
|
2018-07-19 15:48:08 +01:00
|
|
|
|
|
|
|
func (m *QueryResponse) GetSender() *Node {
|
|
|
|
if m != nil {
|
|
|
|
return m.Sender
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryResponse) GetResponse() []*Node {
|
|
|
|
if m != nil {
|
|
|
|
return m.Response
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-30 18:04:29 +00:00
|
|
|
type PingRequest struct {
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PingRequest) Reset() { *m = PingRequest{} }
|
|
|
|
func (m *PingRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PingRequest) ProtoMessage() {}
|
|
|
|
func (*PingRequest) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{14}
|
2018-10-30 18:04:29 +00:00
|
|
|
}
|
|
|
|
func (m *PingRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_PingRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_PingRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *PingRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_PingRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *PingRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_PingRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *PingRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_PingRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_PingRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
type PingResponse struct {
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PingResponse) Reset() { *m = PingResponse{} }
|
|
|
|
func (m *PingResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PingResponse) ProtoMessage() {}
|
|
|
|
func (*PingResponse) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{15}
|
2018-10-30 18:04:29 +00:00
|
|
|
}
|
|
|
|
func (m *PingResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_PingResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *PingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_PingResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *PingResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_PingResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *PingResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_PingResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *PingResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_PingResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_PingResponse proto.InternalMessageInfo
|
|
|
|
|
2018-08-01 15:15:38 +01:00
|
|
|
type Restriction struct {
|
2018-08-03 14:15:52 +01:00
|
|
|
Operator Restriction_Operator `protobuf:"varint,1,opt,name=operator,proto3,enum=overlay.Restriction_Operator" json:"operator,omitempty"`
|
|
|
|
Operand Restriction_Operand `protobuf:"varint,2,opt,name=operand,proto3,enum=overlay.Restriction_Operand" json:"operand,omitempty"`
|
|
|
|
Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
|
2018-08-01 15:15:38 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Restriction) Reset() { *m = Restriction{} }
|
|
|
|
func (m *Restriction) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Restriction) ProtoMessage() {}
|
|
|
|
func (*Restriction) Descriptor() ([]byte, []int) {
|
2018-11-24 02:46:53 +00:00
|
|
|
return fileDescriptor_overlay_0979f23babec84b8, []int{16}
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
func (m *Restriction) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Restriction.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Restriction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Restriction.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *Restriction) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Restriction.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *Restriction) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Restriction.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Restriction) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Restriction.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Restriction proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Restriction) GetOperator() Restriction_Operator {
|
|
|
|
if m != nil {
|
|
|
|
return m.Operator
|
|
|
|
}
|
|
|
|
return Restriction_LT
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Restriction) GetOperand() Restriction_Operand {
|
|
|
|
if m != nil {
|
|
|
|
return m.Operand
|
|
|
|
}
|
2018-11-24 02:46:53 +00:00
|
|
|
return Restriction_FREE_BANDWIDTH
|
2018-08-01 15:15:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Restriction) GetValue() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Value
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-05-01 18:24:32 +01:00
|
|
|
func init() {
|
2018-07-19 15:48:08 +01:00
|
|
|
proto.RegisterType((*LookupRequest)(nil), "overlay.LookupRequest")
|
|
|
|
proto.RegisterType((*LookupResponse)(nil), "overlay.LookupResponse")
|
2018-09-11 05:52:14 +01:00
|
|
|
proto.RegisterType((*LookupRequests)(nil), "overlay.LookupRequests")
|
|
|
|
proto.RegisterType((*LookupResponses)(nil), "overlay.LookupResponses")
|
2018-07-19 15:48:08 +01:00
|
|
|
proto.RegisterType((*FindStorageNodesResponse)(nil), "overlay.FindStorageNodesResponse")
|
|
|
|
proto.RegisterType((*FindStorageNodesRequest)(nil), "overlay.FindStorageNodesRequest")
|
|
|
|
proto.RegisterType((*NodeAddress)(nil), "overlay.NodeAddress")
|
|
|
|
proto.RegisterType((*OverlayOptions)(nil), "overlay.OverlayOptions")
|
|
|
|
proto.RegisterType((*NodeRep)(nil), "overlay.NodeRep")
|
2018-08-01 15:15:38 +01:00
|
|
|
proto.RegisterType((*NodeRestrictions)(nil), "overlay.NodeRestrictions")
|
2018-07-19 15:48:08 +01:00
|
|
|
proto.RegisterType((*Node)(nil), "overlay.Node")
|
2018-11-21 15:07:18 +00:00
|
|
|
proto.RegisterType((*NodeMetadata)(nil), "overlay.NodeMetadata")
|
2018-07-19 15:48:08 +01:00
|
|
|
proto.RegisterType((*QueryRequest)(nil), "overlay.QueryRequest")
|
|
|
|
proto.RegisterType((*QueryResponse)(nil), "overlay.QueryResponse")
|
2018-10-30 18:04:29 +00:00
|
|
|
proto.RegisterType((*PingRequest)(nil), "overlay.PingRequest")
|
|
|
|
proto.RegisterType((*PingResponse)(nil), "overlay.PingResponse")
|
2018-08-01 15:15:38 +01:00
|
|
|
proto.RegisterType((*Restriction)(nil), "overlay.Restriction")
|
2018-07-19 15:48:08 +01:00
|
|
|
proto.RegisterEnum("overlay.NodeTransport", NodeTransport_name, NodeTransport_value)
|
2018-08-01 15:15:38 +01:00
|
|
|
proto.RegisterEnum("overlay.NodeType", NodeType_name, NodeType_value)
|
|
|
|
proto.RegisterEnum("overlay.Restriction_Operator", Restriction_Operator_name, Restriction_Operator_value)
|
|
|
|
proto.RegisterEnum("overlay.Restriction_Operand", Restriction_Operand_name, Restriction_Operand_value)
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
|
|
|
var _ grpc.ClientConn
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
|
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
// Client API for Overlay service
|
|
|
|
|
2018-05-01 18:24:32 +01:00
|
|
|
type OverlayClient interface {
|
|
|
|
// Lookup finds a nodes address from the network
|
|
|
|
Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error)
|
2018-09-11 05:52:14 +01:00
|
|
|
// BulkLookup finds nodes addresses from the network
|
|
|
|
BulkLookup(ctx context.Context, in *LookupRequests, opts ...grpc.CallOption) (*LookupResponses, error)
|
2018-05-01 18:24:32 +01:00
|
|
|
// FindStorageNodes finds a list of nodes in the network that meet the specified request parameters
|
|
|
|
FindStorageNodes(ctx context.Context, in *FindStorageNodesRequest, opts ...grpc.CallOption) (*FindStorageNodesResponse, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type overlayClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewOverlayClient(cc *grpc.ClientConn) OverlayClient {
|
|
|
|
return &overlayClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *overlayClient) Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error) {
|
|
|
|
out := new(LookupResponse)
|
2018-08-01 15:15:38 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/overlay.Overlay/Lookup", in, out, opts...)
|
2018-05-01 18:24:32 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-09-11 05:52:14 +01:00
|
|
|
func (c *overlayClient) BulkLookup(ctx context.Context, in *LookupRequests, opts ...grpc.CallOption) (*LookupResponses, error) {
|
|
|
|
out := new(LookupResponses)
|
|
|
|
err := c.cc.Invoke(ctx, "/overlay.Overlay/BulkLookup", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-05-01 18:24:32 +01:00
|
|
|
func (c *overlayClient) FindStorageNodes(ctx context.Context, in *FindStorageNodesRequest, opts ...grpc.CallOption) (*FindStorageNodesResponse, error) {
|
|
|
|
out := new(FindStorageNodesResponse)
|
2018-08-01 15:15:38 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/overlay.Overlay/FindStorageNodes", in, out, opts...)
|
2018-05-01 18:24:32 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
// Server API for Overlay service
|
|
|
|
|
2018-05-01 18:24:32 +01:00
|
|
|
type OverlayServer interface {
|
|
|
|
// Lookup finds a nodes address from the network
|
|
|
|
Lookup(context.Context, *LookupRequest) (*LookupResponse, error)
|
2018-09-11 05:52:14 +01:00
|
|
|
// BulkLookup finds nodes addresses from the network
|
|
|
|
BulkLookup(context.Context, *LookupRequests) (*LookupResponses, error)
|
2018-05-01 18:24:32 +01:00
|
|
|
// FindStorageNodes finds a list of nodes in the network that meet the specified request parameters
|
|
|
|
FindStorageNodes(context.Context, *FindStorageNodesRequest) (*FindStorageNodesResponse, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterOverlayServer(s *grpc.Server, srv OverlayServer) {
|
|
|
|
s.RegisterService(&_Overlay_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Overlay_Lookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(LookupRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(OverlayServer).Lookup(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2018-07-19 15:48:08 +01:00
|
|
|
FullMethod: "/overlay.Overlay/Lookup",
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(OverlayServer).Lookup(ctx, req.(*LookupRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-09-11 05:52:14 +01:00
|
|
|
func _Overlay_BulkLookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(LookupRequests)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(OverlayServer).BulkLookup(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/overlay.Overlay/BulkLookup",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(OverlayServer).BulkLookup(ctx, req.(*LookupRequests))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-05-01 18:24:32 +01:00
|
|
|
func _Overlay_FindStorageNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(FindStorageNodesRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(OverlayServer).FindStorageNodes(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2018-07-19 15:48:08 +01:00
|
|
|
FullMethod: "/overlay.Overlay/FindStorageNodes",
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(OverlayServer).FindStorageNodes(ctx, req.(*FindStorageNodesRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _Overlay_serviceDesc = grpc.ServiceDesc{
|
2018-07-19 15:48:08 +01:00
|
|
|
ServiceName: "overlay.Overlay",
|
2018-05-01 18:24:32 +01:00
|
|
|
HandlerType: (*OverlayServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Lookup",
|
|
|
|
Handler: _Overlay_Lookup_Handler,
|
|
|
|
},
|
2018-09-11 05:52:14 +01:00
|
|
|
{
|
|
|
|
MethodName: "BulkLookup",
|
|
|
|
Handler: _Overlay_BulkLookup_Handler,
|
|
|
|
},
|
2018-05-01 18:24:32 +01:00
|
|
|
{
|
|
|
|
MethodName: "FindStorageNodes",
|
|
|
|
Handler: _Overlay_FindStorageNodes_Handler,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
2018-11-09 18:40:15 +00:00
|
|
|
Metadata: "overlay.proto",
|
2018-05-01 18:24:32 +01:00
|
|
|
}
|
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
// Client API for Nodes service
|
|
|
|
|
2018-07-19 15:48:08 +01:00
|
|
|
type NodesClient interface {
|
|
|
|
Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
|
2018-10-30 18:04:29 +00:00
|
|
|
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
|
2018-07-19 15:48:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type nodesClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewNodesClient(cc *grpc.ClientConn) NodesClient {
|
|
|
|
return &nodesClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *nodesClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
|
|
|
|
out := new(QueryResponse)
|
2018-08-01 15:15:38 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/overlay.Nodes/Query", in, out, opts...)
|
2018-07-19 15:48:08 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-10-30 18:04:29 +00:00
|
|
|
func (c *nodesClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
|
|
|
|
out := new(PingResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/overlay.Nodes/Ping", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
// Server API for Nodes service
|
|
|
|
|
2018-07-19 15:48:08 +01:00
|
|
|
type NodesServer interface {
|
|
|
|
Query(context.Context, *QueryRequest) (*QueryResponse, error)
|
2018-10-30 18:04:29 +00:00
|
|
|
Ping(context.Context, *PingRequest) (*PingResponse, error)
|
2018-07-19 15:48:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterNodesServer(s *grpc.Server, srv NodesServer) {
|
|
|
|
s.RegisterService(&_Nodes_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Nodes_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(QueryRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(NodesServer).Query(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/overlay.Nodes/Query",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(NodesServer).Query(ctx, req.(*QueryRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-10-30 18:04:29 +00:00
|
|
|
func _Nodes_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(PingRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(NodesServer).Ping(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/overlay.Nodes/Ping",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(NodesServer).Ping(ctx, req.(*PingRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-07-19 15:48:08 +01:00
|
|
|
var _Nodes_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "overlay.Nodes",
|
|
|
|
HandlerType: (*NodesServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Query",
|
|
|
|
Handler: _Nodes_Query_Handler,
|
|
|
|
},
|
2018-10-30 18:04:29 +00:00
|
|
|
{
|
|
|
|
MethodName: "Ping",
|
|
|
|
Handler: _Nodes_Ping_Handler,
|
|
|
|
},
|
2018-07-19 15:48:08 +01:00
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
2018-11-09 18:40:15 +00:00
|
|
|
Metadata: "overlay.proto",
|
2018-07-19 15:48:08 +01:00
|
|
|
}
|
|
|
|
|
2018-11-24 02:46:53 +00:00
|
|
|
func init() { proto.RegisterFile("overlay.proto", fileDescriptor_overlay_0979f23babec84b8) }
|
|
|
|
|
|
|
|
var fileDescriptor_overlay_0979f23babec84b8 = []byte{
|
|
|
|
// 1099 bytes of a gzipped FileDescript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