luci: go.chromium.org/luci/server/cmd/statsd-to-tsmon/config Index | Files

package config

import "go.chromium.org/luci/server/cmd/statsd-to-tsmon/config"

Index

Package Files

config.pb.go gen.go

Variables

var Kind_name = map[int32]string{
    0:  "KIND_UNSPECIFIED",
    1:  "GAUGE",
    2:  "COUNTER",
    3:  "CUMULATIVE_DISTRIBUTION",
}
var Kind_value = map[string]int32{
    "KIND_UNSPECIFIED":        0,
    "GAUGE":                   1,
    "COUNTER":                 2,
    "CUMULATIVE_DISTRIBUTION": 3,
}
var Unit_name = map[int32]string{
    0:  "UNIT_UNSPECIFIED",
    1:  "MILLISECONDS",
    2:  "BYTES",
}
var Unit_value = map[string]int32{
    "UNIT_UNSPECIFIED": 0,
    "MILLISECONDS":     1,
    "BYTES":            2,
}

type Config Uses

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"`
    XXX_NoUnkeyedLiteral struct{}  `json:"-"`
    XXX_unrecognized     []byte    `json:"-"`
    XXX_sizecache        int32     `json:"-"`
}

func (*Config) Descriptor Uses

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

func (*Config) GetMetrics Uses

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

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) Reset Uses

func (m *Config) Reset()

func (*Config) String Uses

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown Uses

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal Uses

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge Uses

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size Uses

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal Uses

func (m *Config) XXX_Unmarshal(b []byte) error

type Kind Uses

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

func (Kind) EnumDescriptor Uses

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

func (Kind) String Uses

func (x Kind) String() string

type Metric Uses

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"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*Metric) Descriptor Uses

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

func (*Metric) GetDesc Uses

func (m *Metric) GetDesc() string

func (*Metric) GetFields Uses

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

func (*Metric) GetKind Uses

func (m *Metric) GetKind() Kind

func (*Metric) GetMetric Uses

func (m *Metric) GetMetric() string

func (*Metric) GetRules Uses

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

func (*Metric) GetUnits Uses

func (m *Metric) GetUnits() Unit

func (*Metric) ProtoMessage Uses

func (*Metric) ProtoMessage()

func (*Metric) Reset Uses

func (m *Metric) Reset()

func (*Metric) String Uses

func (m *Metric) String() string

func (*Metric) XXX_DiscardUnknown Uses

func (m *Metric) XXX_DiscardUnknown()

func (*Metric) XXX_Marshal Uses

func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metric) XXX_Merge Uses

func (m *Metric) XXX_Merge(src proto.Message)

func (*Metric) XXX_Size Uses

func (m *Metric) XXX_Size() int

func (*Metric) XXX_Unmarshal Uses

func (m *Metric) XXX_Unmarshal(b []byte) error

type Rule Uses

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 `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

func (*Rule) Descriptor Uses

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

func (*Rule) GetFields Uses

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

func (*Rule) GetPattern Uses

func (m *Rule) GetPattern() string

func (*Rule) ProtoMessage Uses

func (*Rule) ProtoMessage()

func (*Rule) Reset Uses

func (m *Rule) Reset()

func (*Rule) String Uses

func (m *Rule) String() string

func (*Rule) XXX_DiscardUnknown Uses

func (m *Rule) XXX_DiscardUnknown()

func (*Rule) XXX_Marshal Uses

func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Rule) XXX_Merge Uses

func (m *Rule) XXX_Merge(src proto.Message)

func (*Rule) XXX_Size Uses

func (m *Rule) XXX_Size() int

func (*Rule) XXX_Unmarshal Uses

func (m *Rule) XXX_Unmarshal(b []byte) error

type Unit Uses

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

func (Unit) EnumDescriptor Uses

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

func (Unit) String Uses

func (x Unit) String() string

Package config imports 3 packages (graph) and is imported by 1 packages. Updated 2020-12-01. Refresh now. Tools for package owners.