Documentation ¶
Index ¶
- Constants
- func NewSchedulerForFrontendHandler(svc SchedulerForFrontendHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewSchedulerForQuerierHandler(svc SchedulerForQuerierHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func RegisterSchedulerForFrontendHandler(mux *mux.Router, svc SchedulerForFrontendHandler, ...)
- func RegisterSchedulerForQuerierHandler(mux *mux.Router, svc SchedulerForQuerierHandler, opts ...connect.HandlerOption)
- type SchedulerForFrontendClient
- type SchedulerForFrontendHandler
- type SchedulerForQuerierClient
- type SchedulerForQuerierHandler
- type UnimplementedSchedulerForFrontendHandler
- type UnimplementedSchedulerForQuerierHandler
- func (UnimplementedSchedulerForQuerierHandler) NotifyQuerierShutdown(context.Context, *connect.Request[schedulerpb.NotifyQuerierShutdownRequest]) (*connect.Response[schedulerpb.NotifyQuerierShutdownResponse], error)
- func (UnimplementedSchedulerForQuerierHandler) QuerierLoop(context.Context, ...) error
Constants ¶
const ( // SchedulerForQuerierName is the fully-qualified name of the SchedulerForQuerier service. SchedulerForQuerierName = "schedulerpb.SchedulerForQuerier" // SchedulerForFrontendName is the fully-qualified name of the SchedulerForFrontend service. SchedulerForFrontendName = "schedulerpb.SchedulerForFrontend" )
const ( // SchedulerForQuerierQuerierLoopProcedure is the fully-qualified name of the SchedulerForQuerier's // QuerierLoop RPC. SchedulerForQuerierQuerierLoopProcedure = "/schedulerpb.SchedulerForQuerier/QuerierLoop" // SchedulerForQuerierNotifyQuerierShutdownProcedure is the fully-qualified name of the // SchedulerForQuerier's NotifyQuerierShutdown RPC. SchedulerForQuerierNotifyQuerierShutdownProcedure = "/schedulerpb.SchedulerForQuerier/NotifyQuerierShutdown" // SchedulerForFrontendFrontendLoopProcedure is the fully-qualified name of the // SchedulerForFrontend's FrontendLoop RPC. SchedulerForFrontendFrontendLoopProcedure = "/schedulerpb.SchedulerForFrontend/FrontendLoop" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
Variables ¶
This section is empty.
Functions ¶
func NewSchedulerForFrontendHandler ¶
func NewSchedulerForFrontendHandler(svc SchedulerForFrontendHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewSchedulerForFrontendHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
func NewSchedulerForQuerierHandler ¶
func NewSchedulerForQuerierHandler(svc SchedulerForQuerierHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewSchedulerForQuerierHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
func RegisterSchedulerForFrontendHandler ¶
func RegisterSchedulerForFrontendHandler(mux *mux.Router, svc SchedulerForFrontendHandler, opts ...connect.HandlerOption)
RegisterSchedulerForFrontendHandler register an HTTP handler to a mux.Router from the service implementation.
func RegisterSchedulerForQuerierHandler ¶
func RegisterSchedulerForQuerierHandler(mux *mux.Router, svc SchedulerForQuerierHandler, opts ...connect.HandlerOption)
RegisterSchedulerForQuerierHandler register an HTTP handler to a mux.Router from the service implementation.
Types ¶
type SchedulerForFrontendClient ¶
type SchedulerForFrontendClient interface { // After calling this method, both Frontend and Scheduler enter a loop. Frontend will keep sending ENQUEUE and // CANCEL requests, and scheduler is expected to process them. Scheduler returns one response for each request. // // Long-running loop is used to detect broken connection between frontend and scheduler. This is important for both // parties... if connection breaks, frontend can cancel (and possibly retry on different scheduler) all pending // requests sent to this scheduler, while scheduler can cancel queued requests from given frontend. FrontendLoop(context.Context) *connect.BidiStreamForClient[schedulerpb.FrontendToScheduler, schedulerpb.SchedulerToFrontend] }
SchedulerForFrontendClient is a client for the schedulerpb.SchedulerForFrontend service.
func NewSchedulerForFrontendClient ¶
func NewSchedulerForFrontendClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SchedulerForFrontendClient
NewSchedulerForFrontendClient constructs a client for the schedulerpb.SchedulerForFrontend service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type SchedulerForFrontendHandler ¶
type SchedulerForFrontendHandler interface { // After calling this method, both Frontend and Scheduler enter a loop. Frontend will keep sending ENQUEUE and // CANCEL requests, and scheduler is expected to process them. Scheduler returns one response for each request. // // Long-running loop is used to detect broken connection between frontend and scheduler. This is important for both // parties... if connection breaks, frontend can cancel (and possibly retry on different scheduler) all pending // requests sent to this scheduler, while scheduler can cancel queued requests from given frontend. FrontendLoop(context.Context, *connect.BidiStream[schedulerpb.FrontendToScheduler, schedulerpb.SchedulerToFrontend]) error }
SchedulerForFrontendHandler is an implementation of the schedulerpb.SchedulerForFrontend service.
type SchedulerForQuerierClient ¶
type SchedulerForQuerierClient interface { // After calling this method, both Querier and Scheduler enter a loop, in which querier waits for // "SchedulerToQuerier" messages containing HTTP requests and processes them. After processing the request, // querier signals that it is ready to accept another one by sending empty QuerierToScheduler message. // // Long-running loop is used to detect broken connection between scheduler and querier. This is important // for scheduler to keep a list of connected queriers up-to-date. QuerierLoop(context.Context) *connect.BidiStreamForClient[schedulerpb.QuerierToScheduler, schedulerpb.SchedulerToQuerier] // The querier notifies the query-scheduler that it started a graceful shutdown. NotifyQuerierShutdown(context.Context, *connect.Request[schedulerpb.NotifyQuerierShutdownRequest]) (*connect.Response[schedulerpb.NotifyQuerierShutdownResponse], error) }
SchedulerForQuerierClient is a client for the schedulerpb.SchedulerForQuerier service.
func NewSchedulerForQuerierClient ¶
func NewSchedulerForQuerierClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SchedulerForQuerierClient
NewSchedulerForQuerierClient constructs a client for the schedulerpb.SchedulerForQuerier service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type SchedulerForQuerierHandler ¶
type SchedulerForQuerierHandler interface { // After calling this method, both Querier and Scheduler enter a loop, in which querier waits for // "SchedulerToQuerier" messages containing HTTP requests and processes them. After processing the request, // querier signals that it is ready to accept another one by sending empty QuerierToScheduler message. // // Long-running loop is used to detect broken connection between scheduler and querier. This is important // for scheduler to keep a list of connected queriers up-to-date. QuerierLoop(context.Context, *connect.BidiStream[schedulerpb.QuerierToScheduler, schedulerpb.SchedulerToQuerier]) error // The querier notifies the query-scheduler that it started a graceful shutdown. NotifyQuerierShutdown(context.Context, *connect.Request[schedulerpb.NotifyQuerierShutdownRequest]) (*connect.Response[schedulerpb.NotifyQuerierShutdownResponse], error) }
SchedulerForQuerierHandler is an implementation of the schedulerpb.SchedulerForQuerier service.
type UnimplementedSchedulerForFrontendHandler ¶
type UnimplementedSchedulerForFrontendHandler struct{}
UnimplementedSchedulerForFrontendHandler returns CodeUnimplemented from all methods.
func (UnimplementedSchedulerForFrontendHandler) FrontendLoop ¶
func (UnimplementedSchedulerForFrontendHandler) FrontendLoop(context.Context, *connect.BidiStream[schedulerpb.FrontendToScheduler, schedulerpb.SchedulerToFrontend]) error
type UnimplementedSchedulerForQuerierHandler ¶
type UnimplementedSchedulerForQuerierHandler struct{}
UnimplementedSchedulerForQuerierHandler returns CodeUnimplemented from all methods.
func (UnimplementedSchedulerForQuerierHandler) NotifyQuerierShutdown ¶
func (UnimplementedSchedulerForQuerierHandler) NotifyQuerierShutdown(context.Context, *connect.Request[schedulerpb.NotifyQuerierShutdownRequest]) (*connect.Response[schedulerpb.NotifyQuerierShutdownResponse], error)