Documentation ¶
Index ¶
- func Collectors() []prometheus.Collector
- type ClientSet
- type CompactorClient
- type ConfigClient
- type ConfigMode
- type CortexAdminServer
- func (p *CortexAdminServer) AllUserStats(ctx context.Context, _ *emptypb.Empty) (*cortexadmin.UserIDStatsList, error)
- func (p *CortexAdminServer) DeleteRule(ctx context.Context, in *cortexadmin.RuleRequest) (*emptypb.Empty, error)
- func (p *CortexAdminServer) ExtractRawSeries(ctx context.Context, request *cortexadmin.MatcherRequest) (*cortexadmin.QueryResponse, error)
- func (p *CortexAdminServer) FlushBlocks(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)
- func (p *CortexAdminServer) GetCortexConfig(ctx context.Context, req *cortexadmin.ConfigRequest) (*cortexadmin.ConfigResponse, error)
- func (p *CortexAdminServer) GetCortexStatus(ctx context.Context, _ *emptypb.Empty) (*cortexadmin.CortexStatus, error)
- func (p *CortexAdminServer) GetMetricLabelSets(ctx context.Context, request *cortexadmin.LabelRequest) (*cortexadmin.MetricLabels, error)
- func (p *CortexAdminServer) GetRule(ctx context.Context, in *cortexadmin.RuleRequest) (*cortexadmin.QueryResponse, error)
- func (p *CortexAdminServer) GetSeriesMetrics(ctx context.Context, request *cortexadmin.SeriesRequest) (*cortexadmin.SeriesInfoList, error)
- func (p *CortexAdminServer) Initialize(conf CortexAdminServerConfig)
- func (p *CortexAdminServer) ListRules(ctx context.Context, req *cortexadmin.Cluster) (*cortexadmin.QueryResponse, error)
- func (p *CortexAdminServer) LoadRules(ctx context.Context, in *cortexadmin.PostRuleRequest) (*emptypb.Empty, error)
- func (p *CortexAdminServer) Query(ctx context.Context, in *cortexadmin.QueryRequest) (*cortexadmin.QueryResponse, error)
- func (p *CortexAdminServer) QueryRange(ctx context.Context, in *cortexadmin.QueryRangeRequest) (*cortexadmin.QueryResponse, error)
- func (p *CortexAdminServer) WriteMetrics(ctx context.Context, in *cortexadmin.WriteRequest) (*cortexadmin.WriteResponse, error)
- type CortexAdminServerConfig
- type DataFormat
- type DistributorClient
- type HTTPClientOption
- type HTTPClientOptions
- type HttpApiServer
- type HttpApiServerConfig
- type IngesterClient
- type MemberlistStatusClient
- type MultiTenantRuleAggregator
- type PurgerClient
- type QuerierClient
- type QueryFrontendClient
- type RemoteWriteForwarder
- func (f *RemoteWriteForwarder) Initialize(conf RemoteWriteForwarderConfig)
- func (f *RemoteWriteForwarder) Push(ctx context.Context, payload *remotewrite.Payload) (_ *emptypb.Empty, pushErr error)
- func (f *RemoteWriteForwarder) SyncRules(ctx context.Context, payload *remotewrite.Payload) (_ *emptypb.Empty, syncErr error)
- type RemoteWriteForwarderConfig
- type RingStatusClient
- type RulerClient
- type ServicesStatusClient
- type StoreGatewayClient
- type UninstallTaskRunner
- type UninstallTaskRunnerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Collectors ¶
func Collectors() []prometheus.Collector
Types ¶
type ClientSet ¶
type ClientSet interface { Distributor() DistributorClient Ingester() IngesterClient Ruler() RulerClient Purger() PurgerClient Compactor() CompactorClient StoreGateway() StoreGatewayClient QueryFrontend() QueryFrontendClient Querier() QuerierClient HTTP(options ...HTTPClientOption) *http.Client }
func NewClientSet ¶
type CompactorClient ¶
type CompactorClient interface {
Status(ctx context.Context) (*cortexadmin.CompactorStatus, error)
}
type ConfigClient ¶
type ConfigClient interface {
Config(ctx context.Context, mode ...ConfigMode) (string, error)
}
type ConfigMode ¶
type ConfigMode string
const ( Diff ConfigMode = "diff" Defaults ConfigMode = "defaults" )
type CortexAdminServer ¶
type CortexAdminServer struct { cortexadmin.UnsafeCortexAdminServer CortexAdminServerConfig util.Initializer }
func (*CortexAdminServer) AllUserStats ¶
func (p *CortexAdminServer) AllUserStats(ctx context.Context, _ *emptypb.Empty) (*cortexadmin.UserIDStatsList, error)
func (*CortexAdminServer) DeleteRule ¶
func (p *CortexAdminServer) DeleteRule( ctx context.Context, in *cortexadmin.RuleRequest, ) (*emptypb.Empty, error)
func (*CortexAdminServer) ExtractRawSeries ¶
func (p *CortexAdminServer) ExtractRawSeries(ctx context.Context, request *cortexadmin.MatcherRequest) (*cortexadmin.QueryResponse, error)
func (*CortexAdminServer) FlushBlocks ¶
func (*CortexAdminServer) GetCortexConfig ¶
func (p *CortexAdminServer) GetCortexConfig(ctx context.Context, req *cortexadmin.ConfigRequest) (*cortexadmin.ConfigResponse, error)
func (*CortexAdminServer) GetCortexStatus ¶
func (p *CortexAdminServer) GetCortexStatus(ctx context.Context, _ *emptypb.Empty) (*cortexadmin.CortexStatus, error)
func (*CortexAdminServer) GetMetricLabelSets ¶
func (p *CortexAdminServer) GetMetricLabelSets(ctx context.Context, request *cortexadmin.LabelRequest) (*cortexadmin.MetricLabels, error)
func (*CortexAdminServer) GetRule ¶
func (p *CortexAdminServer) GetRule(ctx context.Context, in *cortexadmin.RuleRequest, ) (*cortexadmin.QueryResponse, error)
func (*CortexAdminServer) GetSeriesMetrics ¶
func (p *CortexAdminServer) GetSeriesMetrics(ctx context.Context, request *cortexadmin.SeriesRequest) (*cortexadmin.SeriesInfoList, error)
func (*CortexAdminServer) Initialize ¶
func (p *CortexAdminServer) Initialize(conf CortexAdminServerConfig)
func (*CortexAdminServer) ListRules ¶
func (p *CortexAdminServer) ListRules(ctx context.Context, req *cortexadmin.Cluster) (*cortexadmin.QueryResponse, error)
func (*CortexAdminServer) LoadRules ¶
func (p *CortexAdminServer) LoadRules(ctx context.Context, in *cortexadmin.PostRuleRequest, ) (*emptypb.Empty, error)
LoadRules This method is responsible for Creating and Updating Rules
func (*CortexAdminServer) Query ¶
func (p *CortexAdminServer) Query( ctx context.Context, in *cortexadmin.QueryRequest, ) (*cortexadmin.QueryResponse, error)
func (*CortexAdminServer) QueryRange ¶
func (p *CortexAdminServer) QueryRange( ctx context.Context, in *cortexadmin.QueryRangeRequest, ) (*cortexadmin.QueryResponse, error)
func (*CortexAdminServer) WriteMetrics ¶
func (p *CortexAdminServer) WriteMetrics(ctx context.Context, in *cortexadmin.WriteRequest) (*cortexadmin.WriteResponse, error)
type CortexAdminServerConfig ¶
type CortexAdminServerConfig struct { CortexClientSet ClientSet `validate:"required"` Config *v1beta1.GatewayConfigSpec `validate:"required"` Logger *zap.SugaredLogger `validate:"required"` }
type DataFormat ¶
type DataFormat string
const ( // Rule data formatted as a single YAML document containing yaml-encoded // []rulefmt.RuleGroup keyed by tenant ID: // <tenantID>: // - name: ... // rules: [...] NamespaceKeyedYAML DataFormat = "namespace-keyed-yaml" // Rule data formatted as JSON containing the prometheus response metadata // and a list of rule groups, each of which has a field "file" containing // the tenant ID: // {"status":"success","data":{"groups":["file":"<tenantID>", ...]}} PrometheusRuleGroupsJSON DataFormat = "prometheus-rule-groups-json" )
type DistributorClient ¶
type DistributorClient interface { distributorpb.DistributorClient ConfigClient Status(ctx context.Context) (*cortexadmin.DistributorStatus, error) }
type HTTPClientOption ¶
type HTTPClientOption func(*HTTPClientOptions)
func WithServerNameOverride ¶
func WithServerNameOverride(serverNameOverride string) HTTPClientOption
type HTTPClientOptions ¶
type HTTPClientOptions struct {
// contains filtered or unexported fields
}
type HttpApiServer ¶
type HttpApiServer struct { HttpApiServerConfig util.Initializer }
func (*HttpApiServer) ConfigureRoutes ¶
func (p *HttpApiServer) ConfigureRoutes(router *gin.Engine)
func (*HttpApiServer) Initialize ¶
func (p *HttpApiServer) Initialize(config HttpApiServerConfig)
type HttpApiServerConfig ¶
type HttpApiServerConfig struct { PluginContext context.Context `validate:"required"` ManagementClient managementv1.ManagementClient `validate:"required"` CortexClientSet ClientSet `validate:"required"` Config *v1beta1.GatewayConfigSpec `validate:"required"` CortexTLSConfig *tls.Config `validate:"required"` Logger *zap.SugaredLogger `validate:"required"` StorageBackend storage.Backend `validate:"required"` AuthMiddlewares map[string]auth.Middleware `validate:"required"` }
type IngesterClient ¶
type IngesterClient interface {
Status(ctx context.Context) (*cortexadmin.IngesterStatus, error)
}
type MemberlistStatusClient ¶
type MemberlistStatusClient interface {
MemberlistStatus(ctx context.Context) (*cortexadmin.MemberlistStatus, error)
}
type MultiTenantRuleAggregator ¶
type MultiTenantRuleAggregator struct {
// contains filtered or unexported fields
}
func NewMultiTenantRuleAggregator ¶
func NewMultiTenantRuleAggregator( client managementv1.ManagementClient, cortexClient *http.Client, headerCodec rbac.HeaderCodec, format DataFormat, ) *MultiTenantRuleAggregator
func (*MultiTenantRuleAggregator) Handle ¶
func (a *MultiTenantRuleAggregator) Handle(c *gin.Context)
type PurgerClient ¶
type PurgerClient interface {
Status(ctx context.Context) (*cortexadmin.PurgerStatus, error)
}
type QuerierClient ¶
type QuerierClient interface {
Status(ctx context.Context) (*cortexadmin.QuerierStatus, error)
}
type QueryFrontendClient ¶
type QueryFrontendClient interface {
Status(ctx context.Context) (*cortexadmin.QueryFrontendStatus, error)
}
type RemoteWriteForwarder ¶
type RemoteWriteForwarder struct { remotewrite.UnsafeRemoteWriteServer RemoteWriteForwarderConfig util.Initializer }
func (*RemoteWriteForwarder) Initialize ¶
func (f *RemoteWriteForwarder) Initialize(conf RemoteWriteForwarderConfig)
func (*RemoteWriteForwarder) Push ¶
func (f *RemoteWriteForwarder) Push(ctx context.Context, payload *remotewrite.Payload) (_ *emptypb.Empty, pushErr error)
func (*RemoteWriteForwarder) SyncRules ¶
func (f *RemoteWriteForwarder) SyncRules(ctx context.Context, payload *remotewrite.Payload) (_ *emptypb.Empty, syncErr error)
type RemoteWriteForwarderConfig ¶
type RemoteWriteForwarderConfig struct { CortexClientSet ClientSet `validate:"required"` Config *v1beta1.GatewayConfigSpec `validate:"required"` Logger *zap.SugaredLogger `validate:"required"` }
type RingStatusClient ¶
type RingStatusClient interface {
RingStatus(ctx context.Context) (*cortexadmin.RingStatus, error)
}
type RulerClient ¶
type RulerClient interface { ruler.RulerClient Status(ctx context.Context) (*cortexadmin.RulerStatus, error) }
type ServicesStatusClient ¶
type ServicesStatusClient interface {
ServicesStatus(ctx context.Context) (*cortexadmin.ServiceStatusList, error)
}
type StoreGatewayClient ¶
type StoreGatewayClient interface {
Status(ctx context.Context) (*cortexadmin.StoreGatewayStatus, error)
}
type UninstallTaskRunner ¶
type UninstallTaskRunner struct { uninstall.DefaultPendingHandler UninstallTaskRunnerConfig util.Initializer }
func (*UninstallTaskRunner) Initialize ¶
func (a *UninstallTaskRunner) Initialize(conf UninstallTaskRunnerConfig)
func (*UninstallTaskRunner) OnTaskCompleted ¶
func (a *UninstallTaskRunner) OnTaskCompleted(ctx context.Context, ti task.ActiveTask, state task.State, args ...any)
func (*UninstallTaskRunner) OnTaskRunning ¶
func (a *UninstallTaskRunner) OnTaskRunning(ctx context.Context, ti task.ActiveTask) error
type UninstallTaskRunnerConfig ¶
type UninstallTaskRunnerConfig struct { CortexClientSet ClientSet `validate:"required"` Config *v1beta1.GatewayConfigSpec `validate:"required"` StorageBackend storage.Backend `validate:"required"` }
Click to show internal directories.
Click to hide internal directories.