cortex

package
v0.5.4-rc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scheme

func Scheme(ctx context.Context) meta.Scheme

Types

type CortexUserIDStats

type CortexUserIDStats struct {
	UserID            string  `json:"userID"`
	IngestionRate     float64 `json:"ingestionRate"`
	NumSeries         uint64  `json:"numSeries"`
	APIIngestionRate  float64 `json:"APIIngestionRate"`
	RuleIngestionRate float64 `json:"RuleIngestionRate"`
}

this is 'github.com/cortexproject/cortex/pkg/distributor.UserIDStats' but importing it causes impossible dependency errors

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 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 Plugin

type Plugin struct {
	cortexadmin.UnsafeCortexAdminServer
	system.UnimplementedSystemPluginClient
	collector.CollectorServer
	// contains filtered or unexported fields
}

func NewPlugin

func NewPlugin(ctx context.Context) *Plugin

func (*Plugin) AllUserStats

func (p *Plugin) AllUserStats(ctx context.Context, _ *emptypb.Empty) (*cortexadmin.UserIDStatsList, error)

func (*Plugin) CanInstall

func (p *Plugin) CanInstall() error

func (*Plugin) ConfigureRoutes

func (p *Plugin) ConfigureRoutes(router *gin.Engine)

func (*Plugin) DeleteRule added in v0.5.4

func (p *Plugin) DeleteRule(
	ctx context.Context, in *cortexadmin.RuleRequest,
) (*emptypb.Empty, error)

func (*Plugin) GetRule added in v0.5.4

func (*Plugin) Install

func (p *Plugin) Install(cluster *corev1.Reference) error

func (*Plugin) InstallerTemplate

func (p *Plugin) InstallerTemplate() string

func (*Plugin) LoadRules added in v0.5.4

func (p *Plugin) LoadRules(ctx context.Context,
	in *cortexadmin.YamlRequest,
) (*emptypb.Empty, error)

This method is responsible for Creating and Updating Rules

func (*Plugin) Query

func (*Plugin) QueryRange

func (*Plugin) StreamServers added in v0.5.4

func (p *Plugin) StreamServers() []streamext.Server

func (*Plugin) Uninstall added in v0.4.2

func (p *Plugin) Uninstall(clustre *corev1.Reference) error

func (*Plugin) UseManagementAPI

func (p *Plugin) UseManagementAPI(client managementv1.ManagementClient)

func (*Plugin) WriteMetrics

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL