Back to godoc.org

Package config

v0.0.0-...-1557bcf
Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module: github.com/luci/luci-go

Index

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

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

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

func (*Config) GetMetrics

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

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

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

func (*Config) XXX_Merge

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

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

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

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) EnumDescriptor

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

func (Kind) String

func (x Kind) String() string

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

func (*Metric) Descriptor

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

func (*Metric) GetDesc

func (m *Metric) GetDesc() string

func (*Metric) GetFields

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

func (*Metric) GetKind

func (m *Metric) GetKind() Kind

func (*Metric) GetMetric

func (m *Metric) GetMetric() string

func (*Metric) GetRules

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

func (*Metric) GetUnits

func (m *Metric) GetUnits() Unit

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) Reset

func (m *Metric) Reset()

func (*Metric) String

func (m *Metric) String() string

func (*Metric) XXX_DiscardUnknown

func (m *Metric) XXX_DiscardUnknown()

func (*Metric) XXX_Marshal

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

func (*Metric) XXX_Merge

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

func (*Metric) XXX_Size

func (m *Metric) XXX_Size() int

func (*Metric) XXX_Unmarshal

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

type Rule

type Rule struct {
	Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"`

	Fields               map[string]string "" /* 153 byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Rule) Descriptor

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

func (*Rule) GetFields

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

func (*Rule) GetPattern

func (m *Rule) GetPattern() string

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) Reset

func (m *Rule) Reset()

func (*Rule) String

func (m *Rule) String() string

func (*Rule) XXX_DiscardUnknown

func (m *Rule) XXX_DiscardUnknown()

func (*Rule) XXX_Marshal

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

func (*Rule) XXX_Merge

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

func (*Rule) XXX_Size

func (m *Rule) XXX_Size() int

func (*Rule) XXX_Unmarshal

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

type Unit

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

func (Unit) EnumDescriptor

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

func (Unit) String

func (x Unit) String() string

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier