storj/protos/overlay/overlay.pb.go

524 lines
18 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go.
// source: overlay.proto
// DO NOT EDIT!
/*
Package overlay is a generated protocol buffer package.
It is generated from these files:
overlay.proto
It has these top-level messages:
LookupRequest
LookupResponse
FindStorageNodesResponse
FindStorageNodesRequest
NodeAddress
OverlayOptions
NodeRep
Node
QueryRequest
QueryResponse
*/
package overlay
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/golang/protobuf/ptypes/duration"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// 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.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// NodeTransport is an enum of possible transports for the overlay network
type NodeTransport int32
const (
NodeTransport_TCP NodeTransport = 0
)
var NodeTransport_name = map[int32]string{
0: "TCP",
}
var NodeTransport_value = map[string]int32{
"TCP": 0,
}
func (x NodeTransport) String() string {
return proto.EnumName(NodeTransport_name, int32(x))
}
func (NodeTransport) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// LookupRequest is is request message for the lookup rpc call
type LookupRequest struct {
NodeID string `protobuf:"bytes,1,opt,name=nodeID" json:"nodeID,omitempty"`
}
func (m *LookupRequest) Reset() { *m = LookupRequest{} }
func (m *LookupRequest) String() string { return proto.CompactTextString(m) }
func (*LookupRequest) ProtoMessage() {}
func (*LookupRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
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 {
Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
}
func (m *LookupResponse) Reset() { *m = LookupResponse{} }
func (m *LookupResponse) String() string { return proto.CompactTextString(m) }
func (*LookupResponse) ProtoMessage() {}
func (*LookupResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *LookupResponse) GetNode() *Node {
if m != nil {
return m.Node
}
return nil
}
// FindStorageNodesResponse is is response message for the FindStorageNodes rpc call
type FindStorageNodesResponse struct {
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
}
func (m *FindStorageNodesResponse) Reset() { *m = FindStorageNodesResponse{} }
func (m *FindStorageNodesResponse) String() string { return proto.CompactTextString(m) }
func (*FindStorageNodesResponse) ProtoMessage() {}
func (*FindStorageNodesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *FindStorageNodesResponse) GetNodes() []*Node {
if m != nil {
return m.Nodes
}
return nil
}
// FindStorageNodesRequest is is request message for the FindStorageNodes rpc call
type FindStorageNodesRequest struct {
ObjectSize int64 `protobuf:"varint,1,opt,name=objectSize" json:"objectSize,omitempty"`
ContractLength *google_protobuf.Duration `protobuf:"bytes,2,opt,name=contractLength" json:"contractLength,omitempty"`
Opts *OverlayOptions `protobuf:"bytes,3,opt,name=opts" json:"opts,omitempty"`
}
func (m *FindStorageNodesRequest) Reset() { *m = FindStorageNodesRequest{} }
func (m *FindStorageNodesRequest) String() string { return proto.CompactTextString(m) }
func (*FindStorageNodesRequest) ProtoMessage() {}
func (*FindStorageNodesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *FindStorageNodesRequest) GetObjectSize() int64 {
if m != nil {
return m.ObjectSize
}
return 0
}
func (m *FindStorageNodesRequest) GetContractLength() *google_protobuf.Duration {
if m != nil {
return m.ContractLength
}
return nil
}
func (m *FindStorageNodesRequest) GetOpts() *OverlayOptions {
if m != nil {
return m.Opts
}
return nil
}
// NodeAddress contains the information needed to communicate with a node on the network
type NodeAddress struct {
Transport NodeTransport `protobuf:"varint,1,opt,name=transport,enum=overlay.NodeTransport" json:"transport,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`
}
func (m *NodeAddress) Reset() { *m = NodeAddress{} }
func (m *NodeAddress) String() string { return proto.CompactTextString(m) }
func (*NodeAddress) ProtoMessage() {}
func (*NodeAddress) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *NodeAddress) GetTransport() NodeTransport {
if m != nil {
return m.Transport
}
return NodeTransport_TCP
}
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 {
MaxLatency *google_protobuf.Duration `protobuf:"bytes,1,opt,name=maxLatency" json:"maxLatency,omitempty"`
MinReputation *NodeRep `protobuf:"bytes,2,opt,name=minReputation" json:"minReputation,omitempty"`
MinSpeedKbps int64 `protobuf:"varint,3,opt,name=minSpeedKbps" json:"minSpeedKbps,omitempty"`
Limit int64 `protobuf:"varint,4,opt,name=limit" json:"limit,omitempty"`
}
func (m *OverlayOptions) Reset() { *m = OverlayOptions{} }
func (m *OverlayOptions) String() string { return proto.CompactTextString(m) }
func (*OverlayOptions) ProtoMessage() {}
func (*OverlayOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *OverlayOptions) GetMaxLatency() *google_protobuf.Duration {
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
}
func (m *OverlayOptions) GetLimit() int64 {
if m != nil {
return m.Limit
}
return 0
}
// NodeRep is the reputation characteristics of a node
type NodeRep struct {
}
func (m *NodeRep) Reset() { *m = NodeRep{} }
func (m *NodeRep) String() string { return proto.CompactTextString(m) }
func (*NodeRep) ProtoMessage() {}
func (*NodeRep) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
// Node represents a node in the overlay network
type Node struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Address *NodeAddress `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`
}
func (m *Node) Reset() { *m = Node{} }
func (m *Node) String() string { return proto.CompactTextString(m) }
func (*Node) ProtoMessage() {}
func (*Node) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
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
}
type QueryRequest struct {
Sender *Node `protobuf:"bytes,1,opt,name=sender" json:"sender,omitempty"`
Receiver *Node `protobuf:"bytes,2,opt,name=receiver" json:"receiver,omitempty"`
}
func (m *QueryRequest) Reset() { *m = QueryRequest{} }
func (m *QueryRequest) String() string { return proto.CompactTextString(m) }
func (*QueryRequest) ProtoMessage() {}
func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *QueryRequest) GetSender() *Node {
if m != nil {
return m.Sender
}
return nil
}
func (m *QueryRequest) GetReceiver() *Node {
if m != nil {
return m.Receiver
}
return nil
}
type QueryResponse struct {
Sender *Node `protobuf:"bytes,1,opt,name=sender" json:"sender,omitempty"`
Response []*Node `protobuf:"bytes,2,rep,name=response" json:"response,omitempty"`
}
func (m *QueryResponse) Reset() { *m = QueryResponse{} }
func (m *QueryResponse) String() string { return proto.CompactTextString(m) }
func (*QueryResponse) ProtoMessage() {}
func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
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
}
func init() {
proto.RegisterType((*LookupRequest)(nil), "overlay.LookupRequest")
proto.RegisterType((*LookupResponse)(nil), "overlay.LookupResponse")
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")
proto.RegisterType((*Node)(nil), "overlay.Node")
proto.RegisterType((*QueryRequest)(nil), "overlay.QueryRequest")
proto.RegisterType((*QueryResponse)(nil), "overlay.QueryResponse")
proto.RegisterEnum("overlay.NodeTransport", NodeTransport_name, NodeTransport_value)
}
// 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
// Client API for Overlay service
type OverlayClient interface {
// Lookup finds a nodes address from the network
Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error)
// 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)
err := grpc.Invoke(ctx, "/overlay.Overlay/Lookup", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *overlayClient) FindStorageNodes(ctx context.Context, in *FindStorageNodesRequest, opts ...grpc.CallOption) (*FindStorageNodesResponse, error) {
out := new(FindStorageNodesResponse)
err := grpc.Invoke(ctx, "/overlay.Overlay/FindStorageNodes", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Overlay service
type OverlayServer interface {
// Lookup finds a nodes address from the network
Lookup(context.Context, *LookupRequest) (*LookupResponse, error)
// 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,
FullMethod: "/overlay.Overlay/Lookup",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OverlayServer).Lookup(ctx, req.(*LookupRequest))
}
return interceptor(ctx, in, info, handler)
}
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,
FullMethod: "/overlay.Overlay/FindStorageNodes",
}
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{
ServiceName: "overlay.Overlay",
HandlerType: (*OverlayServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Lookup",
Handler: _Overlay_Lookup_Handler,
},
{
MethodName: "FindStorageNodes",
Handler: _Overlay_FindStorageNodes_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "overlay.proto",
}
// Client API for Nodes service
type NodesClient interface {
Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
}
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)
err := grpc.Invoke(ctx, "/overlay.Nodes/Query", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Nodes service
type NodesServer interface {
Query(context.Context, *QueryRequest) (*QueryResponse, error)
}
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)
}
var _Nodes_serviceDesc = grpc.ServiceDesc{
ServiceName: "overlay.Nodes",
HandlerType: (*NodesServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Query",
Handler: _Nodes_Query_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "overlay.proto",
}
func init() { proto.RegisterFile("overlay.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 546 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x53, 0xed, 0x6e, 0xd3, 0x30,
0x14, 0x25, 0xfd, 0xa4, 0xb7, 0x4b, 0x55, 0x59, 0xa3, 0x0d, 0xfd, 0x31, 0x75, 0x41, 0x88, 0x2f,
0x29, 0x93, 0x3a, 0x34, 0x69, 0xbf, 0xa6, 0x89, 0x69, 0x12, 0xa2, 0x62, 0xe0, 0x4e, 0xe2, 0x17,
0x12, 0x69, 0x73, 0x29, 0x81, 0xd6, 0x0e, 0xb6, 0x33, 0x51, 0xde, 0x85, 0x07, 0xe0, 0x21, 0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