github.com/grafana/pyroscope@v1.18.0/pkg/scheduler/schedulerpb/scheduler_vtproto.pb.go (about)

     1  // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
     2  // protoc-gen-go-vtproto version: v0.6.0
     3  // source: scheduler/schedulerpb/scheduler.proto
     4  
     5  package schedulerpb
     6  
     7  import (
     8  	context "context"
     9  	fmt "fmt"
    10  	httpgrpc "github.com/grafana/pyroscope/pkg/util/httpgrpc"
    11  	protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
    12  	grpc "google.golang.org/grpc"
    13  	codes "google.golang.org/grpc/codes"
    14  	status "google.golang.org/grpc/status"
    15  	proto "google.golang.org/protobuf/proto"
    16  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    17  	io "io"
    18  )
    19  
    20  const (
    21  	// Verify that this generated code is sufficiently up-to-date.
    22  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    23  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    24  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    25  )
    26  
    27  // This is a compile-time assertion to ensure that this generated file
    28  // is compatible with the grpc package it is being compiled against.
    29  // Requires gRPC-Go v1.32.0 or later.
    30  const _ = grpc.SupportPackageIsVersion7
    31  
    32  // SchedulerForQuerierClient is the client API for SchedulerForQuerier service.
    33  //
    34  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
    35  type SchedulerForQuerierClient interface {
    36  	// After calling this method, both Querier and Scheduler enter a loop, in which querier waits for
    37  	// "SchedulerToQuerier" messages containing HTTP requests and processes them. After processing the request,
    38  	// querier signals that it is ready to accept another one by sending empty QuerierToScheduler message.
    39  	//
    40  	// Long-running loop is used to detect broken connection between scheduler and querier. This is important
    41  	// for scheduler to keep a list of connected queriers up-to-date.
    42  	QuerierLoop(ctx context.Context, opts ...grpc.CallOption) (SchedulerForQuerier_QuerierLoopClient, error)
    43  	// The querier notifies the query-scheduler that it started a graceful shutdown.
    44  	NotifyQuerierShutdown(ctx context.Context, in *NotifyQuerierShutdownRequest, opts ...grpc.CallOption) (*NotifyQuerierShutdownResponse, error)
    45  }
    46  
    47  type schedulerForQuerierClient struct {
    48  	cc grpc.ClientConnInterface
    49  }
    50  
    51  func NewSchedulerForQuerierClient(cc grpc.ClientConnInterface) SchedulerForQuerierClient {
    52  	return &schedulerForQuerierClient{cc}
    53  }
    54  
    55  func (c *schedulerForQuerierClient) QuerierLoop(ctx context.Context, opts ...grpc.CallOption) (SchedulerForQuerier_QuerierLoopClient, error) {
    56  	stream, err := c.cc.NewStream(ctx, &SchedulerForQuerier_ServiceDesc.Streams[0], "/schedulerpb.SchedulerForQuerier/QuerierLoop", opts...)
    57  	if err != nil {
    58  		return nil, err
    59  	}
    60  	x := &schedulerForQuerierQuerierLoopClient{stream}
    61  	return x, nil
    62  }
    63  
    64  type SchedulerForQuerier_QuerierLoopClient interface {
    65  	Send(*QuerierToScheduler) error
    66  	Recv() (*SchedulerToQuerier, error)
    67  	grpc.ClientStream
    68  }
    69  
    70  type schedulerForQuerierQuerierLoopClient struct {
    71  	grpc.ClientStream
    72  }
    73  
    74  func (x *schedulerForQuerierQuerierLoopClient) Send(m *QuerierToScheduler) error {
    75  	return x.ClientStream.SendMsg(m)
    76  }
    77  
    78  func (x *schedulerForQuerierQuerierLoopClient) Recv() (*SchedulerToQuerier, error) {
    79  	m := new(SchedulerToQuerier)
    80  	if err := x.ClientStream.RecvMsg(m); err != nil {
    81  		return nil, err
    82  	}
    83  	return m, nil
    84  }
    85  
    86  func (c *schedulerForQuerierClient) NotifyQuerierShutdown(ctx context.Context, in *NotifyQuerierShutdownRequest, opts ...grpc.CallOption) (*NotifyQuerierShutdownResponse, error) {
    87  	out := new(NotifyQuerierShutdownResponse)
    88  	err := c.cc.Invoke(ctx, "/schedulerpb.SchedulerForQuerier/NotifyQuerierShutdown", in, out, opts...)
    89  	if err != nil {
    90  		return nil, err
    91  	}
    92  	return out, nil
    93  }
    94  
    95  // SchedulerForQuerierServer is the server API for SchedulerForQuerier service.
    96  // All implementations must embed UnimplementedSchedulerForQuerierServer
    97  // for forward compatibility
    98  type SchedulerForQuerierServer interface {
    99  	// After calling this method, both Querier and Scheduler enter a loop, in which querier waits for
   100  	// "SchedulerToQuerier" messages containing HTTP requests and processes them. After processing the request,
   101  	// querier signals that it is ready to accept another one by sending empty QuerierToScheduler message.
   102  	//
   103  	// Long-running loop is used to detect broken connection between scheduler and querier. This is important
   104  	// for scheduler to keep a list of connected queriers up-to-date.
   105  	QuerierLoop(SchedulerForQuerier_QuerierLoopServer) error
   106  	// The querier notifies the query-scheduler that it started a graceful shutdown.
   107  	NotifyQuerierShutdown(context.Context, *NotifyQuerierShutdownRequest) (*NotifyQuerierShutdownResponse, error)
   108  	mustEmbedUnimplementedSchedulerForQuerierServer()
   109  }
   110  
   111  // UnimplementedSchedulerForQuerierServer must be embedded to have forward compatible implementations.
   112  type UnimplementedSchedulerForQuerierServer struct {
   113  }
   114  
   115  func (UnimplementedSchedulerForQuerierServer) QuerierLoop(SchedulerForQuerier_QuerierLoopServer) error {
   116  	return status.Errorf(codes.Unimplemented, "method QuerierLoop not implemented")
   117  }
   118  func (UnimplementedSchedulerForQuerierServer) NotifyQuerierShutdown(context.Context, *NotifyQuerierShutdownRequest) (*NotifyQuerierShutdownResponse, error) {
   119  	return nil, status.Errorf(codes.Unimplemented, "method NotifyQuerierShutdown not implemented")
   120  }
   121  func (UnimplementedSchedulerForQuerierServer) mustEmbedUnimplementedSchedulerForQuerierServer() {}
   122  
   123  // UnsafeSchedulerForQuerierServer may be embedded to opt out of forward compatibility for this service.
   124  // Use of this interface is not recommended, as added methods to SchedulerForQuerierServer will
   125  // result in compilation errors.
   126  type UnsafeSchedulerForQuerierServer interface {
   127  	mustEmbedUnimplementedSchedulerForQuerierServer()
   128  }
   129  
   130  func RegisterSchedulerForQuerierServer(s grpc.ServiceRegistrar, srv SchedulerForQuerierServer) {
   131  	s.RegisterService(&SchedulerForQuerier_ServiceDesc, srv)
   132  }
   133  
   134  func _SchedulerForQuerier_QuerierLoop_Handler(srv interface{}, stream grpc.ServerStream) error {
   135  	return srv.(SchedulerForQuerierServer).QuerierLoop(&schedulerForQuerierQuerierLoopServer{stream})
   136  }
   137  
   138  type SchedulerForQuerier_QuerierLoopServer interface {
   139  	Send(*SchedulerToQuerier) error
   140  	Recv() (*QuerierToScheduler, error)
   141  	grpc.ServerStream
   142  }
   143  
   144  type schedulerForQuerierQuerierLoopServer struct {
   145  	grpc.ServerStream
   146  }
   147  
   148  func (x *schedulerForQuerierQuerierLoopServer) Send(m *SchedulerToQuerier) error {
   149  	return x.ServerStream.SendMsg(m)
   150  }
   151  
   152  func (x *schedulerForQuerierQuerierLoopServer) Recv() (*QuerierToScheduler, error) {
   153  	m := new(QuerierToScheduler)
   154  	if err := x.ServerStream.RecvMsg(m); err != nil {
   155  		return nil, err
   156  	}
   157  	return m, nil
   158  }
   159  
   160  func _SchedulerForQuerier_NotifyQuerierShutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   161  	in := new(NotifyQuerierShutdownRequest)
   162  	if err := dec(in); err != nil {
   163  		return nil, err
   164  	}
   165  	if interceptor == nil {
   166  		return srv.(SchedulerForQuerierServer).NotifyQuerierShutdown(ctx, in)
   167  	}
   168  	info := &grpc.UnaryServerInfo{
   169  		Server:     srv,
   170  		FullMethod: "/schedulerpb.SchedulerForQuerier/NotifyQuerierShutdown",
   171  	}
   172  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   173  		return srv.(SchedulerForQuerierServer).NotifyQuerierShutdown(ctx, req.(*NotifyQuerierShutdownRequest))
   174  	}
   175  	return interceptor(ctx, in, info, handler)
   176  }
   177  
   178  // SchedulerForQuerier_ServiceDesc is the grpc.ServiceDesc for SchedulerForQuerier service.
   179  // It's only intended for direct use with grpc.RegisterService,
   180  // and not to be introspected or modified (even as a copy)
   181  var SchedulerForQuerier_ServiceDesc = grpc.ServiceDesc{
   182  	ServiceName: "schedulerpb.SchedulerForQuerier",
   183  	HandlerType: (*SchedulerForQuerierServer)(nil),
   184  	Methods: []grpc.MethodDesc{
   185  		{
   186  			MethodName: "NotifyQuerierShutdown",
   187  			Handler:    _SchedulerForQuerier_NotifyQuerierShutdown_Handler,
   188  		},
   189  	},
   190  	Streams: []grpc.StreamDesc{
   191  		{
   192  			StreamName:    "QuerierLoop",
   193  			Handler:       _SchedulerForQuerier_QuerierLoop_Handler,
   194  			ServerStreams: true,
   195  			ClientStreams: true,
   196  		},
   197  	},
   198  	Metadata: "scheduler/schedulerpb/scheduler.proto",
   199  }
   200  
   201  // SchedulerForFrontendClient is the client API for SchedulerForFrontend service.
   202  //
   203  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
   204  type SchedulerForFrontendClient interface {
   205  	// After calling this method, both Frontend and Scheduler enter a loop. Frontend will keep sending ENQUEUE and
   206  	// CANCEL requests, and scheduler is expected to process them. Scheduler returns one response for each request.
   207  	//
   208  	// Long-running loop is used to detect broken connection between frontend and scheduler. This is important for both
   209  	// parties... if connection breaks, frontend can cancel (and possibly retry on different scheduler) all pending
   210  	// requests sent to this scheduler, while scheduler can cancel queued requests from given frontend.
   211  	FrontendLoop(ctx context.Context, opts ...grpc.CallOption) (SchedulerForFrontend_FrontendLoopClient, error)
   212  }
   213  
   214  type schedulerForFrontendClient struct {
   215  	cc grpc.ClientConnInterface
   216  }
   217  
   218  func NewSchedulerForFrontendClient(cc grpc.ClientConnInterface) SchedulerForFrontendClient {
   219  	return &schedulerForFrontendClient{cc}
   220  }
   221  
   222  func (c *schedulerForFrontendClient) FrontendLoop(ctx context.Context, opts ...grpc.CallOption) (SchedulerForFrontend_FrontendLoopClient, error) {
   223  	stream, err := c.cc.NewStream(ctx, &SchedulerForFrontend_ServiceDesc.Streams[0], "/schedulerpb.SchedulerForFrontend/FrontendLoop", opts...)
   224  	if err != nil {
   225  		return nil, err
   226  	}
   227  	x := &schedulerForFrontendFrontendLoopClient{stream}
   228  	return x, nil
   229  }
   230  
   231  type SchedulerForFrontend_FrontendLoopClient interface {
   232  	Send(*FrontendToScheduler) error
   233  	Recv() (*SchedulerToFrontend, error)
   234  	grpc.ClientStream
   235  }
   236  
   237  type schedulerForFrontendFrontendLoopClient struct {
   238  	grpc.ClientStream
   239  }
   240  
   241  func (x *schedulerForFrontendFrontendLoopClient) Send(m *FrontendToScheduler) error {
   242  	return x.ClientStream.SendMsg(m)
   243  }
   244  
   245  func (x *schedulerForFrontendFrontendLoopClient) Recv() (*SchedulerToFrontend, error) {
   246  	m := new(SchedulerToFrontend)
   247  	if err := x.ClientStream.RecvMsg(m); err != nil {
   248  		return nil, err
   249  	}
   250  	return m, nil
   251  }
   252  
   253  // SchedulerForFrontendServer is the server API for SchedulerForFrontend service.
   254  // All implementations must embed UnimplementedSchedulerForFrontendServer
   255  // for forward compatibility
   256  type SchedulerForFrontendServer interface {
   257  	// After calling this method, both Frontend and Scheduler enter a loop. Frontend will keep sending ENQUEUE and
   258  	// CANCEL requests, and scheduler is expected to process them. Scheduler returns one response for each request.
   259  	//
   260  	// Long-running loop is used to detect broken connection between frontend and scheduler. This is important for both
   261  	// parties... if connection breaks, frontend can cancel (and possibly retry on different scheduler) all pending
   262  	// requests sent to this scheduler, while scheduler can cancel queued requests from given frontend.
   263  	FrontendLoop(SchedulerForFrontend_FrontendLoopServer) error
   264  	mustEmbedUnimplementedSchedulerForFrontendServer()
   265  }
   266  
   267  // UnimplementedSchedulerForFrontendServer must be embedded to have forward compatible implementations.
   268  type UnimplementedSchedulerForFrontendServer struct {
   269  }
   270  
   271  func (UnimplementedSchedulerForFrontendServer) FrontendLoop(SchedulerForFrontend_FrontendLoopServer) error {
   272  	return status.Errorf(codes.Unimplemented, "method FrontendLoop not implemented")
   273  }
   274  func (UnimplementedSchedulerForFrontendServer) mustEmbedUnimplementedSchedulerForFrontendServer() {}
   275  
   276  // UnsafeSchedulerForFrontendServer may be embedded to opt out of forward compatibility for this service.
   277  // Use of this interface is not recommended, as added methods to SchedulerForFrontendServer will
   278  // result in compilation errors.
   279  type UnsafeSchedulerForFrontendServer interface {
   280  	mustEmbedUnimplementedSchedulerForFrontendServer()
   281  }
   282  
   283  func RegisterSchedulerForFrontendServer(s grpc.ServiceRegistrar, srv SchedulerForFrontendServer) {
   284  	s.RegisterService(&SchedulerForFrontend_ServiceDesc, srv)
   285  }
   286  
   287  func _SchedulerForFrontend_FrontendLoop_Handler(srv interface{}, stream grpc.ServerStream) error {
   288  	return srv.(SchedulerForFrontendServer).FrontendLoop(&schedulerForFrontendFrontendLoopServer{stream})
   289  }
   290  
   291  type SchedulerForFrontend_FrontendLoopServer interface {
   292  	Send(*SchedulerToFrontend) error
   293  	Recv() (*FrontendToScheduler, error)
   294  	grpc.ServerStream
   295  }
   296  
   297  type schedulerForFrontendFrontendLoopServer struct {
   298  	grpc.ServerStream
   299  }
   300  
   301  func (x *schedulerForFrontendFrontendLoopServer) Send(m *SchedulerToFrontend) error {
   302  	return x.ServerStream.SendMsg(m)
   303  }
   304  
   305  func (x *schedulerForFrontendFrontendLoopServer) Recv() (*FrontendToScheduler, error) {
   306  	m := new(FrontendToScheduler)
   307  	if err := x.ServerStream.RecvMsg(m); err != nil {
   308  		return nil, err
   309  	}
   310  	return m, nil
   311  }
   312  
   313  // SchedulerForFrontend_ServiceDesc is the grpc.ServiceDesc for SchedulerForFrontend service.
   314  // It's only intended for direct use with grpc.RegisterService,
   315  // and not to be introspected or modified (even as a copy)
   316  var SchedulerForFrontend_ServiceDesc = grpc.ServiceDesc{
   317  	ServiceName: "schedulerpb.SchedulerForFrontend",
   318  	HandlerType: (*SchedulerForFrontendServer)(nil),
   319  	Methods:     []grpc.MethodDesc{},
   320  	Streams: []grpc.StreamDesc{
   321  		{
   322  			StreamName:    "FrontendLoop",
   323  			Handler:       _SchedulerForFrontend_FrontendLoop_Handler,
   324  			ServerStreams: true,
   325  			ClientStreams: true,
   326  		},
   327  	},
   328  	Metadata: "scheduler/schedulerpb/scheduler.proto",
   329  }
   330  
   331  func (m *QuerierToScheduler) MarshalVT() (dAtA []byte, err error) {
   332  	if m == nil {
   333  		return nil, nil
   334  	}
   335  	size := m.SizeVT()
   336  	dAtA = make([]byte, size)
   337  	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
   338  	if err != nil {
   339  		return nil, err
   340  	}
   341  	return dAtA[:n], nil
   342  }
   343  
   344  func (m *QuerierToScheduler) MarshalToVT(dAtA []byte) (int, error) {
   345  	size := m.SizeVT()
   346  	return m.MarshalToSizedBufferVT(dAtA[:size])
   347  }
   348  
   349  func (m *QuerierToScheduler) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
   350  	if m == nil {
   351  		return 0, nil
   352  	}
   353  	i := len(dAtA)
   354  	_ = i
   355  	var l int
   356  	_ = l
   357  	if m.unknownFields != nil {
   358  		i -= len(m.unknownFields)
   359  		copy(dAtA[i:], m.unknownFields)
   360  	}
   361  	if len(m.QuerierID) > 0 {
   362  		i -= len(m.QuerierID)
   363  		copy(dAtA[i:], m.QuerierID)
   364  		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.QuerierID)))
   365  		i--
   366  		dAtA[i] = 0xa
   367  	}
   368  	return len(dAtA) - i, nil
   369  }
   370  
   371  func (m *SchedulerToQuerier) MarshalVT() (dAtA []byte, err error) {
   372  	if m == nil {
   373  		return nil, nil
   374  	}
   375  	size := m.SizeVT()
   376  	dAtA = make([]byte, size)
   377  	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
   378  	if err != nil {
   379  		return nil, err
   380  	}
   381  	return dAtA[:n], nil
   382  }
   383  
   384  func (m *SchedulerToQuerier) MarshalToVT(dAtA []byte) (int, error) {
   385  	size := m.SizeVT()
   386  	return m.MarshalToSizedBufferVT(dAtA[:size])
   387  }
   388  
   389  func (m *SchedulerToQuerier) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
   390  	if m == nil {
   391  		return 0, nil
   392  	}
   393  	i := len(dAtA)
   394  	_ = i
   395  	var l int
   396  	_ = l
   397  	if m.unknownFields != nil {
   398  		i -= len(m.unknownFields)
   399  		copy(dAtA[i:], m.unknownFields)
   400  	}
   401  	if m.StatsEnabled {
   402  		i--
   403  		if m.StatsEnabled {
   404  			dAtA[i] = 1
   405  		} else {
   406  			dAtA[i] = 0
   407  		}
   408  		i--
   409  		dAtA[i] = 0x28
   410  	}
   411  	if len(m.UserID) > 0 {
   412  		i -= len(m.UserID)
   413  		copy(dAtA[i:], m.UserID)
   414  		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.UserID)))
   415  		i--
   416  		dAtA[i] = 0x22
   417  	}
   418  	if len(m.FrontendAddress) > 0 {
   419  		i -= len(m.FrontendAddress)
   420  		copy(dAtA[i:], m.FrontendAddress)
   421  		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FrontendAddress)))
   422  		i--
   423  		dAtA[i] = 0x1a
   424  	}
   425  	if m.HttpRequest != nil {
   426  		if vtmsg, ok := interface{}(m.HttpRequest).(interface {
   427  			MarshalToSizedBufferVT([]byte) (int, error)
   428  		}); ok {
   429  			size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
   430  			if err != nil {
   431  				return 0, err
   432  			}
   433  			i -= size
   434  			i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
   435  		} else {
   436  			encoded, err := proto.Marshal(m.HttpRequest)
   437  			if err != nil {
   438  				return 0, err
   439  			}
   440  			i -= len(encoded)
   441  			copy(dAtA[i:], encoded)
   442  			i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
   443  		}
   444  		i--
   445  		dAtA[i] = 0x12
   446  	}
   447  	if m.QueryID != 0 {
   448  		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.QueryID))
   449  		i--
   450  		dAtA[i] = 0x8
   451  	}
   452  	return len(dAtA) - i, nil
   453  }
   454  
   455  func (m *FrontendToScheduler) MarshalVT() (dAtA []byte, err error) {
   456  	if m == nil {
   457  		return nil, nil
   458  	}
   459  	size := m.SizeVT()
   460  	dAtA = make([]byte, size)
   461  	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
   462  	if err != nil {
   463  		return nil, err
   464  	}
   465  	return dAtA[:n], nil
   466  }
   467  
   468  func (m *FrontendToScheduler) MarshalToVT(dAtA []byte) (int, error) {
   469  	size := m.SizeVT()
   470  	return m.MarshalToSizedBufferVT(dAtA[:size])
   471  }
   472  
   473  func (m *FrontendToScheduler) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
   474  	if m == nil {
   475  		return 0, nil
   476  	}
   477  	i := len(dAtA)
   478  	_ = i
   479  	var l int
   480  	_ = l
   481  	if m.unknownFields != nil {
   482  		i -= len(m.unknownFields)
   483  		copy(dAtA[i:], m.unknownFields)
   484  	}
   485  	if m.StatsEnabled {
   486  		i--
   487  		if m.StatsEnabled {
   488  			dAtA[i] = 1
   489  		} else {
   490  			dAtA[i] = 0
   491  		}
   492  		i--
   493  		dAtA[i] = 0x30
   494  	}
   495  	if m.HttpRequest != nil {
   496  		if vtmsg, ok := interface{}(m.HttpRequest).(interface {
   497  			MarshalToSizedBufferVT([]byte) (int, error)
   498  		}); ok {
   499  			size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
   500  			if err != nil {
   501  				return 0, err
   502  			}
   503  			i -= size
   504  			i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
   505  		} else {
   506  			encoded, err := proto.Marshal(m.HttpRequest)
   507  			if err != nil {
   508  				return 0, err
   509  			}
   510  			i -= len(encoded)
   511  			copy(dAtA[i:], encoded)
   512  			i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
   513  		}
   514  		i--
   515  		dAtA[i] = 0x2a
   516  	}
   517  	if len(m.UserID) > 0 {
   518  		i -= len(m.UserID)
   519  		copy(dAtA[i:], m.UserID)
   520  		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.UserID)))
   521  		i--
   522  		dAtA[i] = 0x22
   523  	}
   524  	if m.QueryID != 0 {
   525  		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.QueryID))
   526  		i--
   527  		dAtA[i] = 0x18
   528  	}
   529  	if len(m.FrontendAddress) > 0 {
   530  		i -= len(m.FrontendAddress)
   531  		copy(dAtA[i:], m.FrontendAddress)
   532  		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FrontendAddress)))
   533  		i--
   534  		dAtA[i] = 0x12
   535  	}
   536  	if m.Type != 0 {
   537  		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type))
   538  		i--
   539  		dAtA[i] = 0x8
   540  	}
   541  	return len(dAtA) - i, nil
   542  }
   543  
   544  func (m *SchedulerToFrontend) MarshalVT() (dAtA []byte, err error) {
   545  	if m == nil {
   546  		return nil, nil
   547  	}
   548  	size := m.SizeVT()
   549  	dAtA = make([]byte, size)
   550  	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
   551  	if err != nil {
   552  		return nil, err
   553  	}
   554  	return dAtA[:n], nil
   555  }
   556  
   557  func (m *SchedulerToFrontend) MarshalToVT(dAtA []byte) (int, error) {
   558  	size := m.SizeVT()
   559  	return m.MarshalToSizedBufferVT(dAtA[:size])
   560  }
   561  
   562  func (m *SchedulerToFrontend) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
   563  	if m == nil {
   564  		return 0, nil
   565  	}
   566  	i := len(dAtA)
   567  	_ = i
   568  	var l int
   569  	_ = l
   570  	if m.unknownFields != nil {
   571  		i -= len(m.unknownFields)
   572  		copy(dAtA[i:], m.unknownFields)
   573  	}
   574  	if len(m.Error) > 0 {
   575  		i -= len(m.Error)
   576  		copy(dAtA[i:], m.Error)
   577  		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Error)))
   578  		i--
   579  		dAtA[i] = 0x12
   580  	}
   581  	if m.Status != 0 {
   582  		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status))
   583  		i--
   584  		dAtA[i] = 0x8
   585  	}
   586  	return len(dAtA) - i, nil
   587  }
   588  
   589  func (m *NotifyQuerierShutdownRequest) MarshalVT() (dAtA []byte, err error) {
   590  	if m == nil {
   591  		return nil, nil
   592  	}
   593  	size := m.SizeVT()
   594  	dAtA = make([]byte, size)
   595  	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
   596  	if err != nil {
   597  		return nil, err
   598  	}
   599  	return dAtA[:n], nil
   600  }
   601  
   602  func (m *NotifyQuerierShutdownRequest) MarshalToVT(dAtA []byte) (int, error) {
   603  	size := m.SizeVT()
   604  	return m.MarshalToSizedBufferVT(dAtA[:size])
   605  }
   606  
   607  func (m *NotifyQuerierShutdownRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
   608  	if m == nil {
   609  		return 0, nil
   610  	}
   611  	i := len(dAtA)
   612  	_ = i
   613  	var l int
   614  	_ = l
   615  	if m.unknownFields != nil {
   616  		i -= len(m.unknownFields)
   617  		copy(dAtA[i:], m.unknownFields)
   618  	}
   619  	if len(m.QuerierID) > 0 {
   620  		i -= len(m.QuerierID)
   621  		copy(dAtA[i:], m.QuerierID)
   622  		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.QuerierID)))
   623  		i--
   624  		dAtA[i] = 0xa
   625  	}
   626  	return len(dAtA) - i, nil
   627  }
   628  
   629  func (m *NotifyQuerierShutdownResponse) MarshalVT() (dAtA []byte, err error) {
   630  	if m == nil {
   631  		return nil, nil
   632  	}
   633  	size := m.SizeVT()
   634  	dAtA = make([]byte, size)
   635  	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
   636  	if err != nil {
   637  		return nil, err
   638  	}
   639  	return dAtA[:n], nil
   640  }
   641  
   642  func (m *NotifyQuerierShutdownResponse) MarshalToVT(dAtA []byte) (int, error) {
   643  	size := m.SizeVT()
   644  	return m.MarshalToSizedBufferVT(dAtA[:size])
   645  }
   646  
   647  func (m *NotifyQuerierShutdownResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
   648  	if m == nil {
   649  		return 0, nil
   650  	}
   651  	i := len(dAtA)
   652  	_ = i
   653  	var l int
   654  	_ = l
   655  	if m.unknownFields != nil {
   656  		i -= len(m.unknownFields)
   657  		copy(dAtA[i:], m.unknownFields)
   658  	}
   659  	return len(dAtA) - i, nil
   660  }
   661  
   662  func (m *QuerierToScheduler) SizeVT() (n int) {
   663  	if m == nil {
   664  		return 0
   665  	}
   666  	var l int
   667  	_ = l
   668  	l = len(m.QuerierID)
   669  	if l > 0 {
   670  		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
   671  	}
   672  	n += len(m.unknownFields)
   673  	return n
   674  }
   675  
   676  func (m *SchedulerToQuerier) SizeVT() (n int) {
   677  	if m == nil {
   678  		return 0
   679  	}
   680  	var l int
   681  	_ = l
   682  	if m.QueryID != 0 {
   683  		n += 1 + protohelpers.SizeOfVarint(uint64(m.QueryID))
   684  	}
   685  	if m.HttpRequest != nil {
   686  		if size, ok := interface{}(m.HttpRequest).(interface {
   687  			SizeVT() int
   688  		}); ok {
   689  			l = size.SizeVT()
   690  		} else {
   691  			l = proto.Size(m.HttpRequest)
   692  		}
   693  		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
   694  	}
   695  	l = len(m.FrontendAddress)
   696  	if l > 0 {
   697  		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
   698  	}
   699  	l = len(m.UserID)
   700  	if l > 0 {
   701  		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
   702  	}
   703  	if m.StatsEnabled {
   704  		n += 2
   705  	}
   706  	n += len(m.unknownFields)
   707  	return n
   708  }
   709  
   710  func (m *FrontendToScheduler) SizeVT() (n int) {
   711  	if m == nil {
   712  		return 0
   713  	}
   714  	var l int
   715  	_ = l
   716  	if m.Type != 0 {
   717  		n += 1 + protohelpers.SizeOfVarint(uint64(m.Type))
   718  	}
   719  	l = len(m.FrontendAddress)
   720  	if l > 0 {
   721  		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
   722  	}
   723  	if m.QueryID != 0 {
   724  		n += 1 + protohelpers.SizeOfVarint(uint64(m.QueryID))
   725  	}
   726  	l = len(m.UserID)
   727  	if l > 0 {
   728  		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
   729  	}
   730  	if m.HttpRequest != nil {
   731  		if size, ok := interface{}(m.HttpRequest).(interface {
   732  			SizeVT() int
   733  		}); ok {
   734  			l = size.SizeVT()
   735  		} else {
   736  			l = proto.Size(m.HttpRequest)
   737  		}
   738  		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
   739  	}
   740  	if m.StatsEnabled {
   741  		n += 2
   742  	}
   743  	n += len(m.unknownFields)
   744  	return n
   745  }
   746  
   747  func (m *SchedulerToFrontend) SizeVT() (n int) {
   748  	if m == nil {
   749  		return 0
   750  	}
   751  	var l int
   752  	_ = l
   753  	if m.Status != 0 {
   754  		n += 1 + protohelpers.SizeOfVarint(uint64(m.Status))
   755  	}
   756  	l = len(m.Error)
   757  	if l > 0 {
   758  		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
   759  	}
   760  	n += len(m.unknownFields)
   761  	return n
   762  }
   763  
   764  func (m *NotifyQuerierShutdownRequest) SizeVT() (n int) {
   765  	if m == nil {
   766  		return 0
   767  	}
   768  	var l int
   769  	_ = l
   770  	l = len(m.QuerierID)
   771  	if l > 0 {
   772  		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
   773  	}
   774  	n += len(m.unknownFields)
   775  	return n
   776  }
   777  
   778  func (m *NotifyQuerierShutdownResponse) SizeVT() (n int) {
   779  	if m == nil {
   780  		return 0
   781  	}
   782  	var l int
   783  	_ = l
   784  	n += len(m.unknownFields)
   785  	return n
   786  }
   787  
   788  func (m *QuerierToScheduler) UnmarshalVT(dAtA []byte) error {
   789  	l := len(dAtA)
   790  	iNdEx := 0
   791  	for iNdEx < l {
   792  		preIndex := iNdEx
   793  		var wire uint64
   794  		for shift := uint(0); ; shift += 7 {
   795  			if shift >= 64 {
   796  				return protohelpers.ErrIntOverflow
   797  			}
   798  			if iNdEx >= l {
   799  				return io.ErrUnexpectedEOF
   800  			}
   801  			b := dAtA[iNdEx]
   802  			iNdEx++
   803  			wire |= uint64(b&0x7F) << shift
   804  			if b < 0x80 {
   805  				break
   806  			}
   807  		}
   808  		fieldNum := int32(wire >> 3)
   809  		wireType := int(wire & 0x7)
   810  		if wireType == 4 {
   811  			return fmt.Errorf("proto: QuerierToScheduler: wiretype end group for non-group")
   812  		}
   813  		if fieldNum <= 0 {
   814  			return fmt.Errorf("proto: QuerierToScheduler: illegal tag %d (wire type %d)", fieldNum, wire)
   815  		}
   816  		switch fieldNum {
   817  		case 1:
   818  			if wireType != 2 {
   819  				return fmt.Errorf("proto: wrong wireType = %d for field QuerierID", wireType)
   820  			}
   821  			var stringLen uint64
   822  			for shift := uint(0); ; shift += 7 {
   823  				if shift >= 64 {
   824  					return protohelpers.ErrIntOverflow
   825  				}
   826  				if iNdEx >= l {
   827  					return io.ErrUnexpectedEOF
   828  				}
   829  				b := dAtA[iNdEx]
   830  				iNdEx++
   831  				stringLen |= uint64(b&0x7F) << shift
   832  				if b < 0x80 {
   833  					break
   834  				}
   835  			}
   836  			intStringLen := int(stringLen)
   837  			if intStringLen < 0 {
   838  				return protohelpers.ErrInvalidLength
   839  			}
   840  			postIndex := iNdEx + intStringLen
   841  			if postIndex < 0 {
   842  				return protohelpers.ErrInvalidLength
   843  			}
   844  			if postIndex > l {
   845  				return io.ErrUnexpectedEOF
   846  			}
   847  			m.QuerierID = string(dAtA[iNdEx:postIndex])
   848  			iNdEx = postIndex
   849  		default:
   850  			iNdEx = preIndex
   851  			skippy, err := protohelpers.Skip(dAtA[iNdEx:])
   852  			if err != nil {
   853  				return err
   854  			}
   855  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   856  				return protohelpers.ErrInvalidLength
   857  			}
   858  			if (iNdEx + skippy) > l {
   859  				return io.ErrUnexpectedEOF
   860  			}
   861  			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
   862  			iNdEx += skippy
   863  		}
   864  	}
   865  
   866  	if iNdEx > l {
   867  		return io.ErrUnexpectedEOF
   868  	}
   869  	return nil
   870  }
   871  func (m *SchedulerToQuerier) UnmarshalVT(dAtA []byte) error {
   872  	l := len(dAtA)
   873  	iNdEx := 0
   874  	for iNdEx < l {
   875  		preIndex := iNdEx
   876  		var wire uint64
   877  		for shift := uint(0); ; shift += 7 {
   878  			if shift >= 64 {
   879  				return protohelpers.ErrIntOverflow
   880  			}
   881  			if iNdEx >= l {
   882  				return io.ErrUnexpectedEOF
   883  			}
   884  			b := dAtA[iNdEx]
   885  			iNdEx++
   886  			wire |= uint64(b&0x7F) << shift
   887  			if b < 0x80 {
   888  				break
   889  			}
   890  		}
   891  		fieldNum := int32(wire >> 3)
   892  		wireType := int(wire & 0x7)
   893  		if wireType == 4 {
   894  			return fmt.Errorf("proto: SchedulerToQuerier: wiretype end group for non-group")
   895  		}
   896  		if fieldNum <= 0 {
   897  			return fmt.Errorf("proto: SchedulerToQuerier: illegal tag %d (wire type %d)", fieldNum, wire)
   898  		}
   899  		switch fieldNum {
   900  		case 1:
   901  			if wireType != 0 {
   902  				return fmt.Errorf("proto: wrong wireType = %d for field QueryID", wireType)
   903  			}
   904  			m.QueryID = 0
   905  			for shift := uint(0); ; shift += 7 {
   906  				if shift >= 64 {
   907  					return protohelpers.ErrIntOverflow
   908  				}
   909  				if iNdEx >= l {
   910  					return io.ErrUnexpectedEOF
   911  				}
   912  				b := dAtA[iNdEx]
   913  				iNdEx++
   914  				m.QueryID |= uint64(b&0x7F) << shift
   915  				if b < 0x80 {
   916  					break
   917  				}
   918  			}
   919  		case 2:
   920  			if wireType != 2 {
   921  				return fmt.Errorf("proto: wrong wireType = %d for field HttpRequest", wireType)
   922  			}
   923  			var msglen int
   924  			for shift := uint(0); ; shift += 7 {
   925  				if shift >= 64 {
   926  					return protohelpers.ErrIntOverflow
   927  				}
   928  				if iNdEx >= l {
   929  					return io.ErrUnexpectedEOF
   930  				}
   931  				b := dAtA[iNdEx]
   932  				iNdEx++
   933  				msglen |= int(b&0x7F) << shift
   934  				if b < 0x80 {
   935  					break
   936  				}
   937  			}
   938  			if msglen < 0 {
   939  				return protohelpers.ErrInvalidLength
   940  			}
   941  			postIndex := iNdEx + msglen
   942  			if postIndex < 0 {
   943  				return protohelpers.ErrInvalidLength
   944  			}
   945  			if postIndex > l {
   946  				return io.ErrUnexpectedEOF
   947  			}
   948  			if m.HttpRequest == nil {
   949  				m.HttpRequest = &httpgrpc.HTTPRequest{}
   950  			}
   951  			if unmarshal, ok := interface{}(m.HttpRequest).(interface {
   952  				UnmarshalVT([]byte) error
   953  			}); ok {
   954  				if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
   955  					return err
   956  				}
   957  			} else {
   958  				if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.HttpRequest); err != nil {
   959  					return err
   960  				}
   961  			}
   962  			iNdEx = postIndex
   963  		case 3:
   964  			if wireType != 2 {
   965  				return fmt.Errorf("proto: wrong wireType = %d for field FrontendAddress", wireType)
   966  			}
   967  			var stringLen uint64
   968  			for shift := uint(0); ; shift += 7 {
   969  				if shift >= 64 {
   970  					return protohelpers.ErrIntOverflow
   971  				}
   972  				if iNdEx >= l {
   973  					return io.ErrUnexpectedEOF
   974  				}
   975  				b := dAtA[iNdEx]
   976  				iNdEx++
   977  				stringLen |= uint64(b&0x7F) << shift
   978  				if b < 0x80 {
   979  					break
   980  				}
   981  			}
   982  			intStringLen := int(stringLen)
   983  			if intStringLen < 0 {
   984  				return protohelpers.ErrInvalidLength
   985  			}
   986  			postIndex := iNdEx + intStringLen
   987  			if postIndex < 0 {
   988  				return protohelpers.ErrInvalidLength
   989  			}
   990  			if postIndex > l {
   991  				return io.ErrUnexpectedEOF
   992  			}
   993  			m.FrontendAddress = string(dAtA[iNdEx:postIndex])
   994  			iNdEx = postIndex
   995  		case 4:
   996  			if wireType != 2 {
   997  				return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType)
   998  			}
   999  			var stringLen uint64
  1000  			for shift := uint(0); ; shift += 7 {
  1001  				if shift >= 64 {
  1002  					return protohelpers.ErrIntOverflow
  1003  				}
  1004  				if iNdEx >= l {
  1005  					return io.ErrUnexpectedEOF
  1006  				}
  1007  				b := dAtA[iNdEx]
  1008  				iNdEx++
  1009  				stringLen |= uint64(b&0x7F) << shift
  1010  				if b < 0x80 {
  1011  					break
  1012  				}
  1013  			}
  1014  			intStringLen := int(stringLen)
  1015  			if intStringLen < 0 {
  1016  				return protohelpers.ErrInvalidLength
  1017  			}
  1018  			postIndex := iNdEx + intStringLen
  1019  			if postIndex < 0 {
  1020  				return protohelpers.ErrInvalidLength
  1021  			}
  1022  			if postIndex > l {
  1023  				return io.ErrUnexpectedEOF
  1024  			}
  1025  			m.UserID = string(dAtA[iNdEx:postIndex])
  1026  			iNdEx = postIndex
  1027  		case 5:
  1028  			if wireType != 0 {
  1029  				return fmt.Errorf("proto: wrong wireType = %d for field StatsEnabled", wireType)
  1030  			}
  1031  			var v int
  1032  			for shift := uint(0); ; shift += 7 {
  1033  				if shift >= 64 {
  1034  					return protohelpers.ErrIntOverflow
  1035  				}
  1036  				if iNdEx >= l {
  1037  					return io.ErrUnexpectedEOF
  1038  				}
  1039  				b := dAtA[iNdEx]
  1040  				iNdEx++
  1041  				v |= int(b&0x7F) << shift
  1042  				if b < 0x80 {
  1043  					break
  1044  				}
  1045  			}
  1046  			m.StatsEnabled = bool(v != 0)
  1047  		default:
  1048  			iNdEx = preIndex
  1049  			skippy, err := protohelpers.Skip(dAtA[iNdEx:])
  1050  			if err != nil {
  1051  				return err
  1052  			}
  1053  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1054  				return protohelpers.ErrInvalidLength
  1055  			}
  1056  			if (iNdEx + skippy) > l {
  1057  				return io.ErrUnexpectedEOF
  1058  			}
  1059  			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
  1060  			iNdEx += skippy
  1061  		}
  1062  	}
  1063  
  1064  	if iNdEx > l {
  1065  		return io.ErrUnexpectedEOF
  1066  	}
  1067  	return nil
  1068  }
  1069  func (m *FrontendToScheduler) UnmarshalVT(dAtA []byte) error {
  1070  	l := len(dAtA)
  1071  	iNdEx := 0
  1072  	for iNdEx < l {
  1073  		preIndex := iNdEx
  1074  		var wire uint64
  1075  		for shift := uint(0); ; shift += 7 {
  1076  			if shift >= 64 {
  1077  				return protohelpers.ErrIntOverflow
  1078  			}
  1079  			if iNdEx >= l {
  1080  				return io.ErrUnexpectedEOF
  1081  			}
  1082  			b := dAtA[iNdEx]
  1083  			iNdEx++
  1084  			wire |= uint64(b&0x7F) << shift
  1085  			if b < 0x80 {
  1086  				break
  1087  			}
  1088  		}
  1089  		fieldNum := int32(wire >> 3)
  1090  		wireType := int(wire & 0x7)
  1091  		if wireType == 4 {
  1092  			return fmt.Errorf("proto: FrontendToScheduler: wiretype end group for non-group")
  1093  		}
  1094  		if fieldNum <= 0 {
  1095  			return fmt.Errorf("proto: FrontendToScheduler: illegal tag %d (wire type %d)", fieldNum, wire)
  1096  		}
  1097  		switch fieldNum {
  1098  		case 1:
  1099  			if wireType != 0 {
  1100  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1101  			}
  1102  			m.Type = 0
  1103  			for shift := uint(0); ; shift += 7 {
  1104  				if shift >= 64 {
  1105  					return protohelpers.ErrIntOverflow
  1106  				}
  1107  				if iNdEx >= l {
  1108  					return io.ErrUnexpectedEOF
  1109  				}
  1110  				b := dAtA[iNdEx]
  1111  				iNdEx++
  1112  				m.Type |= FrontendToSchedulerType(b&0x7F) << shift
  1113  				if b < 0x80 {
  1114  					break
  1115  				}
  1116  			}
  1117  		case 2:
  1118  			if wireType != 2 {
  1119  				return fmt.Errorf("proto: wrong wireType = %d for field FrontendAddress", wireType)
  1120  			}
  1121  			var stringLen uint64
  1122  			for shift := uint(0); ; shift += 7 {
  1123  				if shift >= 64 {
  1124  					return protohelpers.ErrIntOverflow
  1125  				}
  1126  				if iNdEx >= l {
  1127  					return io.ErrUnexpectedEOF
  1128  				}
  1129  				b := dAtA[iNdEx]
  1130  				iNdEx++
  1131  				stringLen |= uint64(b&0x7F) << shift
  1132  				if b < 0x80 {
  1133  					break
  1134  				}
  1135  			}
  1136  			intStringLen := int(stringLen)
  1137  			if intStringLen < 0 {
  1138  				return protohelpers.ErrInvalidLength
  1139  			}
  1140  			postIndex := iNdEx + intStringLen
  1141  			if postIndex < 0 {
  1142  				return protohelpers.ErrInvalidLength
  1143  			}
  1144  			if postIndex > l {
  1145  				return io.ErrUnexpectedEOF
  1146  			}
  1147  			m.FrontendAddress = string(dAtA[iNdEx:postIndex])
  1148  			iNdEx = postIndex
  1149  		case 3:
  1150  			if wireType != 0 {
  1151  				return fmt.Errorf("proto: wrong wireType = %d for field QueryID", wireType)
  1152  			}
  1153  			m.QueryID = 0
  1154  			for shift := uint(0); ; shift += 7 {
  1155  				if shift >= 64 {
  1156  					return protohelpers.ErrIntOverflow
  1157  				}
  1158  				if iNdEx >= l {
  1159  					return io.ErrUnexpectedEOF
  1160  				}
  1161  				b := dAtA[iNdEx]
  1162  				iNdEx++
  1163  				m.QueryID |= uint64(b&0x7F) << shift
  1164  				if b < 0x80 {
  1165  					break
  1166  				}
  1167  			}
  1168  		case 4:
  1169  			if wireType != 2 {
  1170  				return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType)
  1171  			}
  1172  			var stringLen uint64
  1173  			for shift := uint(0); ; shift += 7 {
  1174  				if shift >= 64 {
  1175  					return protohelpers.ErrIntOverflow
  1176  				}
  1177  				if iNdEx >= l {
  1178  					return io.ErrUnexpectedEOF
  1179  				}
  1180  				b := dAtA[iNdEx]
  1181  				iNdEx++
  1182  				stringLen |= uint64(b&0x7F) << shift
  1183  				if b < 0x80 {
  1184  					break
  1185  				}
  1186  			}
  1187  			intStringLen := int(stringLen)
  1188  			if intStringLen < 0 {
  1189  				return protohelpers.ErrInvalidLength
  1190  			}
  1191  			postIndex := iNdEx + intStringLen
  1192  			if postIndex < 0 {
  1193  				return protohelpers.ErrInvalidLength
  1194  			}
  1195  			if postIndex > l {
  1196  				return io.ErrUnexpectedEOF
  1197  			}
  1198  			m.UserID = string(dAtA[iNdEx:postIndex])
  1199  			iNdEx = postIndex
  1200  		case 5:
  1201  			if wireType != 2 {
  1202  				return fmt.Errorf("proto: wrong wireType = %d for field HttpRequest", wireType)
  1203  			}
  1204  			var msglen int
  1205  			for shift := uint(0); ; shift += 7 {
  1206  				if shift >= 64 {
  1207  					return protohelpers.ErrIntOverflow
  1208  				}
  1209  				if iNdEx >= l {
  1210  					return io.ErrUnexpectedEOF
  1211  				}
  1212  				b := dAtA[iNdEx]
  1213  				iNdEx++
  1214  				msglen |= int(b&0x7F) << shift
  1215  				if b < 0x80 {
  1216  					break
  1217  				}
  1218  			}
  1219  			if msglen < 0 {
  1220  				return protohelpers.ErrInvalidLength
  1221  			}
  1222  			postIndex := iNdEx + msglen
  1223  			if postIndex < 0 {
  1224  				return protohelpers.ErrInvalidLength
  1225  			}
  1226  			if postIndex > l {
  1227  				return io.ErrUnexpectedEOF
  1228  			}
  1229  			if m.HttpRequest == nil {
  1230  				m.HttpRequest = &httpgrpc.HTTPRequest{}
  1231  			}
  1232  			if unmarshal, ok := interface{}(m.HttpRequest).(interface {
  1233  				UnmarshalVT([]byte) error
  1234  			}); ok {
  1235  				if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
  1236  					return err
  1237  				}
  1238  			} else {
  1239  				if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.HttpRequest); err != nil {
  1240  					return err
  1241  				}
  1242  			}
  1243  			iNdEx = postIndex
  1244  		case 6:
  1245  			if wireType != 0 {
  1246  				return fmt.Errorf("proto: wrong wireType = %d for field StatsEnabled", wireType)
  1247  			}
  1248  			var v int
  1249  			for shift := uint(0); ; shift += 7 {
  1250  				if shift >= 64 {
  1251  					return protohelpers.ErrIntOverflow
  1252  				}
  1253  				if iNdEx >= l {
  1254  					return io.ErrUnexpectedEOF
  1255  				}
  1256  				b := dAtA[iNdEx]
  1257  				iNdEx++
  1258  				v |= int(b&0x7F) << shift
  1259  				if b < 0x80 {
  1260  					break
  1261  				}
  1262  			}
  1263  			m.StatsEnabled = bool(v != 0)
  1264  		default:
  1265  			iNdEx = preIndex
  1266  			skippy, err := protohelpers.Skip(dAtA[iNdEx:])
  1267  			if err != nil {
  1268  				return err
  1269  			}
  1270  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1271  				return protohelpers.ErrInvalidLength
  1272  			}
  1273  			if (iNdEx + skippy) > l {
  1274  				return io.ErrUnexpectedEOF
  1275  			}
  1276  			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
  1277  			iNdEx += skippy
  1278  		}
  1279  	}
  1280  
  1281  	if iNdEx > l {
  1282  		return io.ErrUnexpectedEOF
  1283  	}
  1284  	return nil
  1285  }
  1286  func (m *SchedulerToFrontend) UnmarshalVT(dAtA []byte) error {
  1287  	l := len(dAtA)
  1288  	iNdEx := 0
  1289  	for iNdEx < l {
  1290  		preIndex := iNdEx
  1291  		var wire uint64
  1292  		for shift := uint(0); ; shift += 7 {
  1293  			if shift >= 64 {
  1294  				return protohelpers.ErrIntOverflow
  1295  			}
  1296  			if iNdEx >= l {
  1297  				return io.ErrUnexpectedEOF
  1298  			}
  1299  			b := dAtA[iNdEx]
  1300  			iNdEx++
  1301  			wire |= uint64(b&0x7F) << shift
  1302  			if b < 0x80 {
  1303  				break
  1304  			}
  1305  		}
  1306  		fieldNum := int32(wire >> 3)
  1307  		wireType := int(wire & 0x7)
  1308  		if wireType == 4 {
  1309  			return fmt.Errorf("proto: SchedulerToFrontend: wiretype end group for non-group")
  1310  		}
  1311  		if fieldNum <= 0 {
  1312  			return fmt.Errorf("proto: SchedulerToFrontend: illegal tag %d (wire type %d)", fieldNum, wire)
  1313  		}
  1314  		switch fieldNum {
  1315  		case 1:
  1316  			if wireType != 0 {
  1317  				return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
  1318  			}
  1319  			m.Status = 0
  1320  			for shift := uint(0); ; shift += 7 {
  1321  				if shift >= 64 {
  1322  					return protohelpers.ErrIntOverflow
  1323  				}
  1324  				if iNdEx >= l {
  1325  					return io.ErrUnexpectedEOF
  1326  				}
  1327  				b := dAtA[iNdEx]
  1328  				iNdEx++
  1329  				m.Status |= SchedulerToFrontendStatus(b&0x7F) << shift
  1330  				if b < 0x80 {
  1331  					break
  1332  				}
  1333  			}
  1334  		case 2:
  1335  			if wireType != 2 {
  1336  				return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  1337  			}
  1338  			var stringLen uint64
  1339  			for shift := uint(0); ; shift += 7 {
  1340  				if shift >= 64 {
  1341  					return protohelpers.ErrIntOverflow
  1342  				}
  1343  				if iNdEx >= l {
  1344  					return io.ErrUnexpectedEOF
  1345  				}
  1346  				b := dAtA[iNdEx]
  1347  				iNdEx++
  1348  				stringLen |= uint64(b&0x7F) << shift
  1349  				if b < 0x80 {
  1350  					break
  1351  				}
  1352  			}
  1353  			intStringLen := int(stringLen)
  1354  			if intStringLen < 0 {
  1355  				return protohelpers.ErrInvalidLength
  1356  			}
  1357  			postIndex := iNdEx + intStringLen
  1358  			if postIndex < 0 {
  1359  				return protohelpers.ErrInvalidLength
  1360  			}
  1361  			if postIndex > l {
  1362  				return io.ErrUnexpectedEOF
  1363  			}
  1364  			m.Error = string(dAtA[iNdEx:postIndex])
  1365  			iNdEx = postIndex
  1366  		default:
  1367  			iNdEx = preIndex
  1368  			skippy, err := protohelpers.Skip(dAtA[iNdEx:])
  1369  			if err != nil {
  1370  				return err
  1371  			}
  1372  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1373  				return protohelpers.ErrInvalidLength
  1374  			}
  1375  			if (iNdEx + skippy) > l {
  1376  				return io.ErrUnexpectedEOF
  1377  			}
  1378  			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
  1379  			iNdEx += skippy
  1380  		}
  1381  	}
  1382  
  1383  	if iNdEx > l {
  1384  		return io.ErrUnexpectedEOF
  1385  	}
  1386  	return nil
  1387  }
  1388  func (m *NotifyQuerierShutdownRequest) UnmarshalVT(dAtA []byte) error {
  1389  	l := len(dAtA)
  1390  	iNdEx := 0
  1391  	for iNdEx < l {
  1392  		preIndex := iNdEx
  1393  		var wire uint64
  1394  		for shift := uint(0); ; shift += 7 {
  1395  			if shift >= 64 {
  1396  				return protohelpers.ErrIntOverflow
  1397  			}
  1398  			if iNdEx >= l {
  1399  				return io.ErrUnexpectedEOF
  1400  			}
  1401  			b := dAtA[iNdEx]
  1402  			iNdEx++
  1403  			wire |= uint64(b&0x7F) << shift
  1404  			if b < 0x80 {
  1405  				break
  1406  			}
  1407  		}
  1408  		fieldNum := int32(wire >> 3)
  1409  		wireType := int(wire & 0x7)
  1410  		if wireType == 4 {
  1411  			return fmt.Errorf("proto: NotifyQuerierShutdownRequest: wiretype end group for non-group")
  1412  		}
  1413  		if fieldNum <= 0 {
  1414  			return fmt.Errorf("proto: NotifyQuerierShutdownRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1415  		}
  1416  		switch fieldNum {
  1417  		case 1:
  1418  			if wireType != 2 {
  1419  				return fmt.Errorf("proto: wrong wireType = %d for field QuerierID", wireType)
  1420  			}
  1421  			var stringLen uint64
  1422  			for shift := uint(0); ; shift += 7 {
  1423  				if shift >= 64 {
  1424  					return protohelpers.ErrIntOverflow
  1425  				}
  1426  				if iNdEx >= l {
  1427  					return io.ErrUnexpectedEOF
  1428  				}
  1429  				b := dAtA[iNdEx]
  1430  				iNdEx++
  1431  				stringLen |= uint64(b&0x7F) << shift
  1432  				if b < 0x80 {
  1433  					break
  1434  				}
  1435  			}
  1436  			intStringLen := int(stringLen)
  1437  			if intStringLen < 0 {
  1438  				return protohelpers.ErrInvalidLength
  1439  			}
  1440  			postIndex := iNdEx + intStringLen
  1441  			if postIndex < 0 {
  1442  				return protohelpers.ErrInvalidLength
  1443  			}
  1444  			if postIndex > l {
  1445  				return io.ErrUnexpectedEOF
  1446  			}
  1447  			m.QuerierID = string(dAtA[iNdEx:postIndex])
  1448  			iNdEx = postIndex
  1449  		default:
  1450  			iNdEx = preIndex
  1451  			skippy, err := protohelpers.Skip(dAtA[iNdEx:])
  1452  			if err != nil {
  1453  				return err
  1454  			}
  1455  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1456  				return protohelpers.ErrInvalidLength
  1457  			}
  1458  			if (iNdEx + skippy) > l {
  1459  				return io.ErrUnexpectedEOF
  1460  			}
  1461  			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
  1462  			iNdEx += skippy
  1463  		}
  1464  	}
  1465  
  1466  	if iNdEx > l {
  1467  		return io.ErrUnexpectedEOF
  1468  	}
  1469  	return nil
  1470  }
  1471  func (m *NotifyQuerierShutdownResponse) UnmarshalVT(dAtA []byte) error {
  1472  	l := len(dAtA)
  1473  	iNdEx := 0
  1474  	for iNdEx < l {
  1475  		preIndex := iNdEx
  1476  		var wire uint64
  1477  		for shift := uint(0); ; shift += 7 {
  1478  			if shift >= 64 {
  1479  				return protohelpers.ErrIntOverflow
  1480  			}
  1481  			if iNdEx >= l {
  1482  				return io.ErrUnexpectedEOF
  1483  			}
  1484  			b := dAtA[iNdEx]
  1485  			iNdEx++
  1486  			wire |= uint64(b&0x7F) << shift
  1487  			if b < 0x80 {
  1488  				break
  1489  			}
  1490  		}
  1491  		fieldNum := int32(wire >> 3)
  1492  		wireType := int(wire & 0x7)
  1493  		if wireType == 4 {
  1494  			return fmt.Errorf("proto: NotifyQuerierShutdownResponse: wiretype end group for non-group")
  1495  		}
  1496  		if fieldNum <= 0 {
  1497  			return fmt.Errorf("proto: NotifyQuerierShutdownResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1498  		}
  1499  		switch fieldNum {
  1500  		default:
  1501  			iNdEx = preIndex
  1502  			skippy, err := protohelpers.Skip(dAtA[iNdEx:])
  1503  			if err != nil {
  1504  				return err
  1505  			}
  1506  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1507  				return protohelpers.ErrInvalidLength
  1508  			}
  1509  			if (iNdEx + skippy) > l {
  1510  				return io.ErrUnexpectedEOF
  1511  			}
  1512  			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
  1513  			iNdEx += skippy
  1514  		}
  1515  	}
  1516  
  1517  	if iNdEx > l {
  1518  		return io.ErrUnexpectedEOF
  1519  	}
  1520  	return nil
  1521  }