storj/pkg/pb/bandwidth.pb.go
Dylan Lott c6d790d58e
Improvements to Kad Lookups (#731)
* adds channel for getting node out of lookup

* WIP adding the channels to lookups

* WIP adding channel to node lookups

* Wires up FindNodes method with channels

* WIP adds a test suite for lookup - tests are still failing

* WIP wires up use of testplanet for kademlia lookup tests

* WIP merging in node id changes

* Merges in pkg/storj node type changes

* Tests passing

* Lookup node working via Inspector now

* updates

* WIP working on getting tests passing

* WIP getting tests passing

* FindNode works

* Linter fix

* Adds copyrights to lookup_test

* removes a fmt.Printf I missed

* Removes commented out lines
2018-12-04 14:39:28 -07:00

180 lines
6.5 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: bandwidth.proto
package pb
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import context "golang.org/x/net/context"
import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type AgreementsSummary_Status int32
const (
AgreementsSummary_FAIL AgreementsSummary_Status = 0
AgreementsSummary_OK AgreementsSummary_Status = 1
)
var AgreementsSummary_Status_name = map[int32]string{
0: "FAIL",
1: "OK",
}
var AgreementsSummary_Status_value = map[string]int32{
"FAIL": 0,
"OK": 1,
}
func (x AgreementsSummary_Status) String() string {
return proto.EnumName(AgreementsSummary_Status_name, int32(x))
}
func (AgreementsSummary_Status) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_bandwidth_01db992f91c47bae, []int{0, 0}
}
type AgreementsSummary struct {
Status AgreementsSummary_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bandwidth.AgreementsSummary_Status" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AgreementsSummary) Reset() { *m = AgreementsSummary{} }
func (m *AgreementsSummary) String() string { return proto.CompactTextString(m) }
func (*AgreementsSummary) ProtoMessage() {}
func (*AgreementsSummary) Descriptor() ([]byte, []int) {
return fileDescriptor_bandwidth_01db992f91c47bae, []int{0}
}
func (m *AgreementsSummary) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AgreementsSummary.Unmarshal(m, b)
}
func (m *AgreementsSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AgreementsSummary.Marshal(b, m, deterministic)
}
func (dst *AgreementsSummary) XXX_Merge(src proto.Message) {
xxx_messageInfo_AgreementsSummary.Merge(dst, src)
}
func (m *AgreementsSummary) XXX_Size() int {
return xxx_messageInfo_AgreementsSummary.Size(m)
}
func (m *AgreementsSummary) XXX_DiscardUnknown() {
xxx_messageInfo_AgreementsSummary.DiscardUnknown(m)
}
var xxx_messageInfo_AgreementsSummary proto.InternalMessageInfo
func (m *AgreementsSummary) GetStatus() AgreementsSummary_Status {
if m != nil {
return m.Status
}
return AgreementsSummary_FAIL
}
func init() {
proto.RegisterType((*AgreementsSummary)(nil), "bandwidth.AgreementsSummary")
proto.RegisterEnum("bandwidth.AgreementsSummary_Status", AgreementsSummary_Status_name, AgreementsSummary_Status_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 Bandwidth service
type BandwidthClient interface {
BandwidthAgreements(ctx context.Context, in *RenterBandwidthAllocation, opts ...grpc.CallOption) (*AgreementsSummary, error)
}
type bandwidthClient struct {
cc *grpc.ClientConn
}
func NewBandwidthClient(cc *grpc.ClientConn) BandwidthClient {
return &bandwidthClient{cc}
}
func (c *bandwidthClient) BandwidthAgreements(ctx context.Context, in *RenterBandwidthAllocation, opts ...grpc.CallOption) (*AgreementsSummary, error) {
out := new(AgreementsSummary)
err := c.cc.Invoke(ctx, "/bandwidth.Bandwidth/BandwidthAgreements", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Bandwidth service
type BandwidthServer interface {
BandwidthAgreements(context.Context, *RenterBandwidthAllocation) (*AgreementsSummary, error)
}
func RegisterBandwidthServer(s *grpc.Server, srv BandwidthServer) {
s.RegisterService(&_Bandwidth_serviceDesc, srv)
}
func _Bandwidth_BandwidthAgreements_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RenterBandwidthAllocation)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BandwidthServer).BandwidthAgreements(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/bandwidth.Bandwidth/BandwidthAgreements",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BandwidthServer).BandwidthAgreements(ctx, req.(*RenterBandwidthAllocation))
}
return interceptor(ctx, in, info, handler)
}
var _Bandwidth_serviceDesc = grpc.ServiceDesc{
ServiceName: "bandwidth.Bandwidth",
HandlerType: (*BandwidthServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "BandwidthAgreements",
Handler: _Bandwidth_BandwidthAgreements_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "bandwidth.proto",
}
func init() { proto.RegisterFile("bandwidth.proto", fileDescriptor_bandwidth_01db992f91c47bae) }
var fileDescriptor_bandwidth_01db992f91c47bae = []byte{
// 196 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x4a, 0xcc, 0x4b,
0x29, 0xcf, 0x4c, 0x29, 0xc9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48,
0x09, 0x14, 0x64, 0xa6, 0x26, 0xa7, 0x16, 0x97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