config

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Kind_name = map[int32]string{
		0: "KIND_UNSPECIFIED",
		1: "GAUGE",
		2: "COUNTER",
		3: "CUMULATIVE_DISTRIBUTION",
	}
	Kind_value = map[string]int32{
		"KIND_UNSPECIFIED":        0,
		"GAUGE":                   1,
		"COUNTER":                 2,
		"CUMULATIVE_DISTRIBUTION": 3,
	}
)

Enum value maps for Kind.

View Source
var (
	Unit_name = map[int32]string{
		0: "UNIT_UNSPECIFIED",
		1: "MILLISECONDS",
		2: "BYTES",
	}
	Unit_value = map[string]int32{
		"UNIT_UNSPECIFIED": 0,
		"MILLISECONDS":     1,
		"BYTES":            2,
	}
)

Enum value maps for Unit.

View Source
var File_go_chromium_org_luci_server_cmd_statsd_to_tsmon_config_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {

	// A collection of tsmon metrics and rules for how to extract them from statsd
	// metrics.
	Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetMetrics

func (x *Config) GetMetrics() []*Metric

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Kind

type Kind int32
const (
	Kind_KIND_UNSPECIFIED        Kind = 0
	Kind_GAUGE                   Kind = 1
	Kind_COUNTER                 Kind = 2
	Kind_CUMULATIVE_DISTRIBUTION Kind = 3
)

func (Kind) Descriptor

func (Kind) Descriptor() protoreflect.EnumDescriptor

func (Kind) Enum

func (x Kind) Enum() *Kind

func (Kind) EnumDescriptor deprecated

func (Kind) EnumDescriptor() ([]byte, []int)

Deprecated: Use Kind.Descriptor instead.

func (Kind) Number

func (x Kind) Number() protoreflect.EnumNumber

func (Kind) String

func (x Kind) String() string

func (Kind) Type

func (Kind) Type() protoreflect.EnumType

type Metric

type Metric struct {

	// Name of the tsmon metric to produce, required.
	Metric string `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"`
	// A kind of the metric, required.
	Kind Kind `protobuf:"varint,2,opt,name=kind,proto3,enum=statsd_to_tsmon.config.Kind" json:"kind,omitempty"`
	// Metric description. Optional, but recommended.
	Desc string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"`
	// Units of the metric value. Optional, but recommended.
	Units Unit `protobuf:"varint,4,opt,name=units,proto3,enum=statsd_to_tsmon.config.Unit" json:"units,omitempty"`
	// A set of fields of this metric.
	Fields []string `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"`
	// A list of rules that map statds metrics to fields of this metric.
	//
	// Each rule is represented by a statsd metric name pattern (that looks like
	// e.g. "something.*.${var}.*.sfx") and a recipe of how to get tsmon field
	// name of metrics matching the pattern.
	//
	// In the current implementation the last component of each pattern must be
	// some static string (i.e. not `*` and not a var) and all such suffixes must
	// be unique across the entire configuration file.
	Rules []*Rule `protobuf:"bytes,6,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*Metric) Descriptor deprecated

func (*Metric) Descriptor() ([]byte, []int)

Deprecated: Use Metric.ProtoReflect.Descriptor instead.

func (*Metric) GetDesc

func (x *Metric) GetDesc() string

func (*Metric) GetFields

func (x *Metric) GetFields() []string

func (*Metric) GetKind

func (x *Metric) GetKind() Kind

func (*Metric) GetMetric

func (x *Metric) GetMetric() string

func (*Metric) GetRules

func (x *Metric) GetRules() []*Rule

func (*Metric) GetUnits

func (x *Metric) GetUnits() Unit

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) ProtoReflect

func (x *Metric) ProtoReflect() protoreflect.Message

func (*Metric) Reset

func (x *Metric) Reset()

func (*Metric) String

func (x *Metric) String() string

type Rule

type Rule struct {

	// A pattern to match statsd metric name against.
	//
	// Also used to "extract" interesting portions of the metric name to use them
	// in `fields`.
	//
	// For example, if the pattern is "something.*.${var}.*.sfx", statds metric
	// "something.foo.val.bar.sfx" matches it, and `var` value is set to "val".
	Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"`
	// A map "field name => its value".
	//
	// The set of field names should be equal to the set of fields specified
	// in the metric definition.
	//
	// Each field value is either a static string ("foo"), or a reference to
	// some variable ("${var}") parsed from the statsd metric name according to
	// the pattern.
	Fields map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Rule) Descriptor deprecated

func (*Rule) Descriptor() ([]byte, []int)

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) GetFields

func (x *Rule) GetFields() map[string]string

func (*Rule) GetPattern

func (x *Rule) GetPattern() string

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect

func (x *Rule) ProtoReflect() protoreflect.Message

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) String

func (x *Rule) String() string

type Unit

type Unit int32
const (
	Unit_UNIT_UNSPECIFIED Unit = 0
	Unit_MILLISECONDS     Unit = 1
	Unit_BYTES            Unit = 2
)

func (Unit) Descriptor

func (Unit) Descriptor() protoreflect.EnumDescriptor

func (Unit) Enum

func (x Unit) Enum() *Unit

func (Unit) EnumDescriptor deprecated

func (Unit) EnumDescriptor() ([]byte, []int)

Deprecated: Use Unit.Descriptor instead.

func (Unit) Number

func (x Unit) Number() protoreflect.EnumNumber

func (Unit) String

func (x Unit) String() string

func (Unit) Type

func (Unit) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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