package agentproto
import (
context "context"
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
io "io"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
)
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion3
type ReshardRequest struct {
}
func (m *ReshardRequest) Reset() { *m = ReshardRequest{} }
func (*ReshardRequest) ProtoMessage() {}
func (*ReshardRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_56ede974c0020f77, []int{0}
}
func (m *ReshardRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ReshardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ReshardRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ReshardRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReshardRequest.Merge(m, src)
}
func (m *ReshardRequest) XXX_Size() int {
return m.Size()
}
func (m *ReshardRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ReshardRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ReshardRequest proto.InternalMessageInfo
func init() {
proto.RegisterType((*ReshardRequest)(nil), "agentproto.ReshardRequest")
}
func init() { proto.RegisterFile("agent.proto", fileDescriptor_56ede974c0020f77) }
var fileDescriptor_56ede974c0020f77 = []byte{
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0x4c, 0x4f, 0xcd,
0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x02, 0x73, 0xc0, 0x6c, 0x29, 0xe9, 0xf4,
0xfc, 0xfc, 0xf4, 0x9c, 0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ReshardRequest) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*ReshardRequest)
if !ok {
that2, ok := that.(ReshardRequest)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
return true
}
func (this *ReshardRequest) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 4)
s = append(s, "&agentproto.ReshardRequest{")
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringAgent(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
var _ context.Context
var _ grpc.ClientConn
const _ = grpc.SupportPackageIsVersion4
type ScrapingServiceClient interface {
Reshard(ctx context.Context, in *ReshardRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type scrapingServiceClient struct {
cc *grpc.ClientConn
}
func NewScrapingServiceClient(cc *grpc.ClientConn) ScrapingServiceClient {
return &scrapingServiceClient{cc}
}
func (c *scrapingServiceClient) Reshard(ctx context.Context, in *ReshardRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/agentproto.ScrapingService/Reshard", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
type ScrapingServiceServer interface {
Reshard(context.Context, *ReshardRequest) (*empty.Empty, error)
}
type UnimplementedScrapingServiceServer struct {
}
func (*UnimplementedScrapingServiceServer) Reshard(ctx context.Context, req *ReshardRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Reshard not implemented")
}
func RegisterScrapingServiceServer(s *grpc.Server, srv ScrapingServiceServer) {
s.RegisterService(&_ScrapingService_serviceDesc, srv)
}
func _ScrapingService_Reshard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReshardRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ScrapingServiceServer).Reshard(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/agentproto.ScrapingService/Reshard",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ScrapingServiceServer).Reshard(ctx, req.(*ReshardRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ScrapingService_serviceDesc = grpc.ServiceDesc{
ServiceName: "agentproto.ScrapingService",
HandlerType: (*ScrapingServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Reshard",
Handler: _ScrapingService_Reshard_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "agent.proto",
}
func (m *ReshardRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ReshardRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ReshardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func encodeVarintAgent(dAtA []byte, offset int, v uint64) int {
offset -= sovAgent(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ReshardRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func sovAgent(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozAgent(x uint64) (n int) {
return sovAgent(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *ReshardRequest) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ReshardRequest{`,
`}`,
}, "")
return s
}
func valueToStringAgent(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *ReshardRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAgent
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ReshardRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ReshardRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipAgent(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthAgent
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthAgent
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipAgent(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowAgent
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowAgent
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowAgent
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthAgent
}
iNdEx += length
if iNdEx < 0 {
return 0, ErrInvalidLengthAgent
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowAgent
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipAgent(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
if iNdEx < 0 {
return 0, ErrInvalidLengthAgent
}
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthAgent = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowAgent = fmt.Errorf("proto: integer overflow")
)