github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/cli/systembench/systembenchpb/ping.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cli/systembench/systembenchpb/ping.proto
     3  
     4  package systembench
     5  
     6  import proto "github.com/gogo/protobuf/proto"
     7  import fmt "fmt"
     8  import math "math"
     9  
    10  import (
    11  	context "context"
    12  	grpc "google.golang.org/grpc"
    13  )
    14  
    15  import io "io"
    16  
    17  // Reference imports to suppress errors if they are not otherwise used.
    18  var _ = proto.Marshal
    19  var _ = fmt.Errorf
    20  var _ = math.Inf
    21  
    22  // This is a compile-time assertion to ensure that this generated file
    23  // is compatible with the proto package it is being compiled against.
    24  // A compilation error at this line likely means your copy of the
    25  // proto package needs to be updated.
    26  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    27  
    28  type PingRequest struct {
    29  	Payload []byte `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
    30  }
    31  
    32  func (m *PingRequest) Reset()         { *m = PingRequest{} }
    33  func (m *PingRequest) String() string { return proto.CompactTextString(m) }
    34  func (*PingRequest) ProtoMessage()    {}
    35  func (*PingRequest) Descriptor() ([]byte, []int) {
    36  	return fileDescriptor_ping_72d92a0e7b9988d9, []int{0}
    37  }
    38  func (m *PingRequest) XXX_Unmarshal(b []byte) error {
    39  	return m.Unmarshal(b)
    40  }
    41  func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    42  	b = b[:cap(b)]
    43  	n, err := m.MarshalTo(b)
    44  	if err != nil {
    45  		return nil, err
    46  	}
    47  	return b[:n], nil
    48  }
    49  func (dst *PingRequest) XXX_Merge(src proto.Message) {
    50  	xxx_messageInfo_PingRequest.Merge(dst, src)
    51  }
    52  func (m *PingRequest) XXX_Size() int {
    53  	return m.Size()
    54  }
    55  func (m *PingRequest) XXX_DiscardUnknown() {
    56  	xxx_messageInfo_PingRequest.DiscardUnknown(m)
    57  }
    58  
    59  var xxx_messageInfo_PingRequest proto.InternalMessageInfo
    60  
    61  type PingResponse struct {
    62  	Payload []byte `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
    63  }
    64  
    65  func (m *PingResponse) Reset()         { *m = PingResponse{} }
    66  func (m *PingResponse) String() string { return proto.CompactTextString(m) }
    67  func (*PingResponse) ProtoMessage()    {}
    68  func (*PingResponse) Descriptor() ([]byte, []int) {
    69  	return fileDescriptor_ping_72d92a0e7b9988d9, []int{1}
    70  }
    71  func (m *PingResponse) XXX_Unmarshal(b []byte) error {
    72  	return m.Unmarshal(b)
    73  }
    74  func (m *PingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    75  	b = b[:cap(b)]
    76  	n, err := m.MarshalTo(b)
    77  	if err != nil {
    78  		return nil, err
    79  	}
    80  	return b[:n], nil
    81  }
    82  func (dst *PingResponse) XXX_Merge(src proto.Message) {
    83  	xxx_messageInfo_PingResponse.Merge(dst, src)
    84  }
    85  func (m *PingResponse) XXX_Size() int {
    86  	return m.Size()
    87  }
    88  func (m *PingResponse) XXX_DiscardUnknown() {
    89  	xxx_messageInfo_PingResponse.DiscardUnknown(m)
    90  }
    91  
    92  var xxx_messageInfo_PingResponse proto.InternalMessageInfo
    93  
    94  func init() {
    95  	proto.RegisterType((*PingRequest)(nil), "systembench.PingRequest")
    96  	proto.RegisterType((*PingResponse)(nil), "systembench.PingResponse")
    97  }
    98  
    99  // Reference imports to suppress errors if they are not otherwise used.
   100  var _ context.Context
   101  var _ grpc.ClientConn
   102  
   103  // This is a compile-time assertion to ensure that this generated file
   104  // is compatible with the grpc package it is being compiled against.
   105  const _ = grpc.SupportPackageIsVersion4
   106  
   107  // PingerClient is the client API for Pinger service.
   108  //
   109  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   110  type PingerClient interface {
   111  	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
   112  }
   113  
   114  type pingerClient struct {
   115  	cc *grpc.ClientConn
   116  }
   117  
   118  func NewPingerClient(cc *grpc.ClientConn) PingerClient {
   119  	return &pingerClient{cc}
   120  }
   121  
   122  func (c *pingerClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
   123  	out := new(PingResponse)
   124  	err := c.cc.Invoke(ctx, "/systembench.Pinger/Ping", in, out, opts...)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	return out, nil
   129  }
   130  
   131  // PingerServer is the server API for Pinger service.
   132  type PingerServer interface {
   133  	Ping(context.Context, *PingRequest) (*PingResponse, error)
   134  }
   135  
   136  func RegisterPingerServer(s *grpc.Server, srv PingerServer) {
   137  	s.RegisterService(&_Pinger_serviceDesc, srv)
   138  }
   139  
   140  func _Pinger_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   141  	in := new(PingRequest)
   142  	if err := dec(in); err != nil {
   143  		return nil, err
   144  	}
   145  	if interceptor == nil {
   146  		return srv.(PingerServer).Ping(ctx, in)
   147  	}
   148  	info := &grpc.UnaryServerInfo{
   149  		Server:     srv,
   150  		FullMethod: "/systembench.Pinger/Ping",
   151  	}
   152  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   153  		return srv.(PingerServer).Ping(ctx, req.(*PingRequest))
   154  	}
   155  	return interceptor(ctx, in, info, handler)
   156  }
   157  
   158  var _Pinger_serviceDesc = grpc.ServiceDesc{
   159  	ServiceName: "systembench.Pinger",
   160  	HandlerType: (*PingerServer)(nil),
   161  	Methods: []grpc.MethodDesc{
   162  		{
   163  			MethodName: "Ping",
   164  			Handler:    _Pinger_Ping_Handler,
   165  		},
   166  	},
   167  	Streams:  []grpc.StreamDesc{},
   168  	Metadata: "cli/systembench/systembenchpb/ping.proto",
   169  }
   170  
   171  func (m *PingRequest) Marshal() (dAtA []byte, err error) {
   172  	size := m.Size()
   173  	dAtA = make([]byte, size)
   174  	n, err := m.MarshalTo(dAtA)
   175  	if err != nil {
   176  		return nil, err
   177  	}
   178  	return dAtA[:n], nil
   179  }
   180  
   181  func (m *PingRequest) MarshalTo(dAtA []byte) (int, error) {
   182  	var i int
   183  	_ = i
   184  	var l int
   185  	_ = l
   186  	if m.Payload != nil {
   187  		dAtA[i] = 0xa
   188  		i++
   189  		i = encodeVarintPing(dAtA, i, uint64(len(m.Payload)))
   190  		i += copy(dAtA[i:], m.Payload)
   191  	}
   192  	return i, nil
   193  }
   194  
   195  func (m *PingResponse) Marshal() (dAtA []byte, err error) {
   196  	size := m.Size()
   197  	dAtA = make([]byte, size)
   198  	n, err := m.MarshalTo(dAtA)
   199  	if err != nil {
   200  		return nil, err
   201  	}
   202  	return dAtA[:n], nil
   203  }
   204  
   205  func (m *PingResponse) MarshalTo(dAtA []byte) (int, error) {
   206  	var i int
   207  	_ = i
   208  	var l int
   209  	_ = l
   210  	if m.Payload != nil {
   211  		dAtA[i] = 0xa
   212  		i++
   213  		i = encodeVarintPing(dAtA, i, uint64(len(m.Payload)))
   214  		i += copy(dAtA[i:], m.Payload)
   215  	}
   216  	return i, nil
   217  }
   218  
   219  func encodeVarintPing(dAtA []byte, offset int, v uint64) int {
   220  	for v >= 1<<7 {
   221  		dAtA[offset] = uint8(v&0x7f | 0x80)
   222  		v >>= 7
   223  		offset++
   224  	}
   225  	dAtA[offset] = uint8(v)
   226  	return offset + 1
   227  }
   228  func (m *PingRequest) Size() (n int) {
   229  	if m == nil {
   230  		return 0
   231  	}
   232  	var l int
   233  	_ = l
   234  	if m.Payload != nil {
   235  		l = len(m.Payload)
   236  		n += 1 + l + sovPing(uint64(l))
   237  	}
   238  	return n
   239  }
   240  
   241  func (m *PingResponse) Size() (n int) {
   242  	if m == nil {
   243  		return 0
   244  	}
   245  	var l int
   246  	_ = l
   247  	if m.Payload != nil {
   248  		l = len(m.Payload)
   249  		n += 1 + l + sovPing(uint64(l))
   250  	}
   251  	return n
   252  }
   253  
   254  func sovPing(x uint64) (n int) {
   255  	for {
   256  		n++
   257  		x >>= 7
   258  		if x == 0 {
   259  			break
   260  		}
   261  	}
   262  	return n
   263  }
   264  func sozPing(x uint64) (n int) {
   265  	return sovPing(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   266  }
   267  func (m *PingRequest) Unmarshal(dAtA []byte) error {
   268  	l := len(dAtA)
   269  	iNdEx := 0
   270  	for iNdEx < l {
   271  		preIndex := iNdEx
   272  		var wire uint64
   273  		for shift := uint(0); ; shift += 7 {
   274  			if shift >= 64 {
   275  				return ErrIntOverflowPing
   276  			}
   277  			if iNdEx >= l {
   278  				return io.ErrUnexpectedEOF
   279  			}
   280  			b := dAtA[iNdEx]
   281  			iNdEx++
   282  			wire |= (uint64(b) & 0x7F) << shift
   283  			if b < 0x80 {
   284  				break
   285  			}
   286  		}
   287  		fieldNum := int32(wire >> 3)
   288  		wireType := int(wire & 0x7)
   289  		if wireType == 4 {
   290  			return fmt.Errorf("proto: PingRequest: wiretype end group for non-group")
   291  		}
   292  		if fieldNum <= 0 {
   293  			return fmt.Errorf("proto: PingRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   294  		}
   295  		switch fieldNum {
   296  		case 1:
   297  			if wireType != 2 {
   298  				return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
   299  			}
   300  			var byteLen int
   301  			for shift := uint(0); ; shift += 7 {
   302  				if shift >= 64 {
   303  					return ErrIntOverflowPing
   304  				}
   305  				if iNdEx >= l {
   306  					return io.ErrUnexpectedEOF
   307  				}
   308  				b := dAtA[iNdEx]
   309  				iNdEx++
   310  				byteLen |= (int(b) & 0x7F) << shift
   311  				if b < 0x80 {
   312  					break
   313  				}
   314  			}
   315  			if byteLen < 0 {
   316  				return ErrInvalidLengthPing
   317  			}
   318  			postIndex := iNdEx + byteLen
   319  			if postIndex > l {
   320  				return io.ErrUnexpectedEOF
   321  			}
   322  			m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
   323  			if m.Payload == nil {
   324  				m.Payload = []byte{}
   325  			}
   326  			iNdEx = postIndex
   327  		default:
   328  			iNdEx = preIndex
   329  			skippy, err := skipPing(dAtA[iNdEx:])
   330  			if err != nil {
   331  				return err
   332  			}
   333  			if skippy < 0 {
   334  				return ErrInvalidLengthPing
   335  			}
   336  			if (iNdEx + skippy) > l {
   337  				return io.ErrUnexpectedEOF
   338  			}
   339  			iNdEx += skippy
   340  		}
   341  	}
   342  
   343  	if iNdEx > l {
   344  		return io.ErrUnexpectedEOF
   345  	}
   346  	return nil
   347  }
   348  func (m *PingResponse) Unmarshal(dAtA []byte) error {
   349  	l := len(dAtA)
   350  	iNdEx := 0
   351  	for iNdEx < l {
   352  		preIndex := iNdEx
   353  		var wire uint64
   354  		for shift := uint(0); ; shift += 7 {
   355  			if shift >= 64 {
   356  				return ErrIntOverflowPing
   357  			}
   358  			if iNdEx >= l {
   359  				return io.ErrUnexpectedEOF
   360  			}
   361  			b := dAtA[iNdEx]
   362  			iNdEx++
   363  			wire |= (uint64(b) & 0x7F) << shift
   364  			if b < 0x80 {
   365  				break
   366  			}
   367  		}
   368  		fieldNum := int32(wire >> 3)
   369  		wireType := int(wire & 0x7)
   370  		if wireType == 4 {
   371  			return fmt.Errorf("proto: PingResponse: wiretype end group for non-group")
   372  		}
   373  		if fieldNum <= 0 {
   374  			return fmt.Errorf("proto: PingResponse: illegal tag %d (wire type %d)", fieldNum, wire)
   375  		}
   376  		switch fieldNum {
   377  		case 1:
   378  			if wireType != 2 {
   379  				return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
   380  			}
   381  			var byteLen int
   382  			for shift := uint(0); ; shift += 7 {
   383  				if shift >= 64 {
   384  					return ErrIntOverflowPing
   385  				}
   386  				if iNdEx >= l {
   387  					return io.ErrUnexpectedEOF
   388  				}
   389  				b := dAtA[iNdEx]
   390  				iNdEx++
   391  				byteLen |= (int(b) & 0x7F) << shift
   392  				if b < 0x80 {
   393  					break
   394  				}
   395  			}
   396  			if byteLen < 0 {
   397  				return ErrInvalidLengthPing
   398  			}
   399  			postIndex := iNdEx + byteLen
   400  			if postIndex > l {
   401  				return io.ErrUnexpectedEOF
   402  			}
   403  			m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
   404  			if m.Payload == nil {
   405  				m.Payload = []byte{}
   406  			}
   407  			iNdEx = postIndex
   408  		default:
   409  			iNdEx = preIndex
   410  			skippy, err := skipPing(dAtA[iNdEx:])
   411  			if err != nil {
   412  				return err
   413  			}
   414  			if skippy < 0 {
   415  				return ErrInvalidLengthPing
   416  			}
   417  			if (iNdEx + skippy) > l {
   418  				return io.ErrUnexpectedEOF
   419  			}
   420  			iNdEx += skippy
   421  		}
   422  	}
   423  
   424  	if iNdEx > l {
   425  		return io.ErrUnexpectedEOF
   426  	}
   427  	return nil
   428  }
   429  func skipPing(dAtA []byte) (n int, err error) {
   430  	l := len(dAtA)
   431  	iNdEx := 0
   432  	for iNdEx < l {
   433  		var wire uint64
   434  		for shift := uint(0); ; shift += 7 {
   435  			if shift >= 64 {
   436  				return 0, ErrIntOverflowPing
   437  			}
   438  			if iNdEx >= l {
   439  				return 0, io.ErrUnexpectedEOF
   440  			}
   441  			b := dAtA[iNdEx]
   442  			iNdEx++
   443  			wire |= (uint64(b) & 0x7F) << shift
   444  			if b < 0x80 {
   445  				break
   446  			}
   447  		}
   448  		wireType := int(wire & 0x7)
   449  		switch wireType {
   450  		case 0:
   451  			for shift := uint(0); ; shift += 7 {
   452  				if shift >= 64 {
   453  					return 0, ErrIntOverflowPing
   454  				}
   455  				if iNdEx >= l {
   456  					return 0, io.ErrUnexpectedEOF
   457  				}
   458  				iNdEx++
   459  				if dAtA[iNdEx-1] < 0x80 {
   460  					break
   461  				}
   462  			}
   463  			return iNdEx, nil
   464  		case 1:
   465  			iNdEx += 8
   466  			return iNdEx, nil
   467  		case 2:
   468  			var length int
   469  			for shift := uint(0); ; shift += 7 {
   470  				if shift >= 64 {
   471  					return 0, ErrIntOverflowPing
   472  				}
   473  				if iNdEx >= l {
   474  					return 0, io.ErrUnexpectedEOF
   475  				}
   476  				b := dAtA[iNdEx]
   477  				iNdEx++
   478  				length |= (int(b) & 0x7F) << shift
   479  				if b < 0x80 {
   480  					break
   481  				}
   482  			}
   483  			iNdEx += length
   484  			if length < 0 {
   485  				return 0, ErrInvalidLengthPing
   486  			}
   487  			return iNdEx, nil
   488  		case 3:
   489  			for {
   490  				var innerWire uint64
   491  				var start int = iNdEx
   492  				for shift := uint(0); ; shift += 7 {
   493  					if shift >= 64 {
   494  						return 0, ErrIntOverflowPing
   495  					}
   496  					if iNdEx >= l {
   497  						return 0, io.ErrUnexpectedEOF
   498  					}
   499  					b := dAtA[iNdEx]
   500  					iNdEx++
   501  					innerWire |= (uint64(b) & 0x7F) << shift
   502  					if b < 0x80 {
   503  						break
   504  					}
   505  				}
   506  				innerWireType := int(innerWire & 0x7)
   507  				if innerWireType == 4 {
   508  					break
   509  				}
   510  				next, err := skipPing(dAtA[start:])
   511  				if err != nil {
   512  					return 0, err
   513  				}
   514  				iNdEx = start + next
   515  			}
   516  			return iNdEx, nil
   517  		case 4:
   518  			return iNdEx, nil
   519  		case 5:
   520  			iNdEx += 4
   521  			return iNdEx, nil
   522  		default:
   523  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   524  		}
   525  	}
   526  	panic("unreachable")
   527  }
   528  
   529  var (
   530  	ErrInvalidLengthPing = fmt.Errorf("proto: negative length found during unmarshaling")
   531  	ErrIntOverflowPing   = fmt.Errorf("proto: integer overflow")
   532  )
   533  
   534  func init() {
   535  	proto.RegisterFile("cli/systembench/systembenchpb/ping.proto", fileDescriptor_ping_72d92a0e7b9988d9)
   536  }
   537  
   538  var fileDescriptor_ping_72d92a0e7b9988d9 = []byte{
   539  	// 175 bytes of a gzipped FileDescriptorProto
   540  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x48, 0xce, 0xc9, 0xd4,
   541  	0x2f, 0xae, 0x2c, 0x2e, 0x49, 0xcd, 0x4d, 0x4a, 0xcd, 0x4b, 0xce, 0x40, 0x66, 0x17, 0x24, 0xe9,
   542  	0x17, 0x64, 0xe6, 0xa5, 0xeb, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x71, 0x23, 0xc9, 0x28, 0xa9,
   543  	0x73, 0x71, 0x07, 0x64, 0xe6, 0xa5, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x49, 0x70,
   544  	0xb1, 0x17, 0x24, 0x56, 0xe6, 0xe4, 0x27, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0xc1,
   545  	0xb8, 0x4a, 0x1a, 0x5c, 0x3c, 0x10, 0x85, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0xb8, 0x55, 0x1a,
   546  	0xb9, 0x73, 0xb1, 0x81, 0x54, 0xa6, 0x16, 0x09, 0xd9, 0x72, 0xb1, 0x80, 0x58, 0x42, 0x12, 0x7a,
   547  	0x48, 0x56, 0xea, 0x21, 0xd9, 0x27, 0x25, 0x89, 0x45, 0x06, 0x62, 0x81, 0x12, 0x83, 0x93, 0xc2,
   548  	0x89, 0x87, 0x72, 0x0c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c,
   549  	0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1,
   550  	0x1c, 0x03, 0x20, 0x00, 0x00, 0xff, 0xff, 0x97, 0x2b, 0x64, 0x57, 0xf5, 0x00, 0x00, 0x00,
   551  }