// 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 */ 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 { NodeAddress *NodeAddress `protobuf:"bytes,1,opt,name=nodeAddress" json:"nodeAddress,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) GetNodeAddress() *NodeAddress { if m != nil { return m.NodeAddress } return nil } // FindStorageNodesResponse is is response message for the FindStorageNodes rpc call type FindStorageNodesResponse struct { Node []*Node `protobuf:"bytes,1,rep,name=node" json:"node,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) GetNode() []*Node { if m != nil { return m.Node } 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=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"` } 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 } // 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 } func init() { proto.RegisterType((*LookupRequest)(nil), "LookupRequest") proto.RegisterType((*LookupResponse)(nil), "LookupResponse") proto.RegisterType((*FindStorageNodesResponse)(nil), "FindStorageNodesResponse") proto.RegisterType((*FindStorageNodesRequest)(nil), "FindStorageNodesRequest") proto.RegisterType((*NodeAddress)(nil), "NodeAddress") proto.RegisterType((*OverlayOptions)(nil), "OverlayOptions") proto.RegisterType((*NodeRep)(nil), "NodeRep") proto.RegisterType((*Node)(nil), "Node") proto.RegisterEnum("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/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/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/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/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", HandlerType: (*OverlayServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Lookup", Handler: _Overlay_Lookup_Handler, }, { MethodName: "FindStorageNodes", Handler: _Overlay_FindStorageNodes_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "overlay.proto", } func init() { proto.RegisterFile("overlay.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ // 444 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x92, 0x51, 0x6f, 0xd3, 0x30, 0x10, 0xc7, 0x49, 0x53, 0x5a, 0x7a, 0x5d, 0xb3, 0xc9, 0x0f, 0x90, 0xf6, 0x61, 0x9a, 0x8c, 0x04, 0x03, 0x21, 0x4f, 0x2a, 0xe2, 0x81, 0x17, 0xc4, 0x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