Documentation ¶
Index ¶
- Constants
- type Config
- type Frontend
- func (f *Frontend) CheckReady(_ context.Context) error
- func (f *Frontend) Do(ctx context.Context, req queryrangebase.Request) (queryrangebase.Response, error)
- func (f *Frontend) QueryResult(ctx context.Context, qrReq *frontendv2pb.QueryResultRequest) (*frontendv2pb.QueryResultResponse, error)
- func (f *Frontend) RoundTripGRPC(ctx context.Context, req *httpgrpc.HTTPRequest) (*httpgrpc.HTTPResponse, error)
- type ResponseTuple
Constants ¶
View Source
const ( EncodingJSON = "json" EncodingProtobuf = "protobuf" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SchedulerAddress string `yaml:"scheduler_address"` DNSLookupPeriod time.Duration `yaml:"scheduler_dns_lookup_period"` WorkerConcurrency int `yaml:"scheduler_worker_concurrency"` GRPCClientConfig grpcclient.Config `yaml:"grpc_client_config"` GracefulShutdownTimeout time.Duration `yaml:"graceful_shutdown_timeout"` // Used to find local IP address, that is sent to scheduler and querier-worker. InfNames []string `yaml:"instance_interface_names" doc:"default=[<private network interfaces>]"` // If set, address is not computed from interfaces. Addr string `yaml:"address" doc:"hidden"` Port int `doc:"hidden"` // Defines the encoding for requests to and responses from the scheduler and querier. Encoding string `yaml:"encoding"` }
Config for a Frontend.
func (*Config) RegisterFlags ¶
type Frontend ¶
Frontend implements GrpcRoundTripper. It queues HTTP requests, dispatches them to backends via gRPC, and handles retries for requests which failed.
func NewFrontend ¶
func NewFrontend(cfg Config, ring ring.ReadRing, log log.Logger, reg prometheus.Registerer, codec transport.Codec, metricsNamespace string) (*Frontend, error)
NewFrontend creates a new frontend.
func (*Frontend) CheckReady ¶
CheckReady determines if the query frontend is ready. Function parameters/return chosen to match the same method in the ingester
func (*Frontend) Do ¶
func (f *Frontend) Do(ctx context.Context, req queryrangebase.Request) (queryrangebase.Response, error)
Do implements queryrangebase.Handler analogous to RoundTripGRPC.
func (*Frontend) QueryResult ¶
func (f *Frontend) QueryResult(ctx context.Context, qrReq *frontendv2pb.QueryResultRequest) (*frontendv2pb.QueryResultResponse, error)
func (*Frontend) RoundTripGRPC ¶
func (f *Frontend) RoundTripGRPC(ctx context.Context, req *httpgrpc.HTTPRequest) (*httpgrpc.HTTPResponse, error)
RoundTripGRPC round trips a proto (instead of a HTTP request).
type ResponseTuple ¶
type ResponseTuple = struct { *frontendv2pb.QueryResultRequest // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.