config

package
Version: v0.0.0-...-2259094 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConfig   = fmt.Errorf("proto: integer overflow")
)
View Source
var Params_MetricInfo_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "COUNTER",
	2: "GAUGE",
	3: "DISTRIBUTION",
}
View Source
var Params_MetricInfo_Type_value = map[string]int32{
	"UNKNOWN":      0,
	"COUNTER":      1,
	"GAUGE":        2,
	"DISTRIBUTION": 3,
}

Functions

This section is empty.

Types

type Params

type Params struct {
	// Address of the statsd server, e.g. localhost:8125
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Metric prefix, do not specify for no prefix
	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// FlushDuration controls the maximum amount of time between sending metrics to the statsd collection server.
	// Metrics are reported when either flush_bytes is full or flush_duration time has elapsed since the last report.
	FlushDuration time.Duration `protobuf:"bytes,3,opt,name=flush_duration,json=flushDuration,proto3,stdduration" json:"flush_duration"`
	// Maximum UDP packet size to send; if not specified defaults to 512 bytes. If the statsd server is running on the
	// same (private) network 1432 bytes is recommended for better performance.
	FlushBytes int32 `protobuf:"varint,4,opt,name=flush_bytes,json=flushBytes,proto3" json:"flush_bytes,omitempty"`
	// Chance that any particular metric is sampled when incremented; can take the range [0, 1], defaults to 1 if unspecified.
	SamplingRate float32 `protobuf:"fixed32,5,opt,name=sampling_rate,json=samplingRate,proto3" json:"sampling_rate,omitempty"`
	// Map of metric name -> info. If a metric's name is not in the map then the metric will not be exported to statsd.
	Metrics map[string]*Params_MetricInfo `` /* 155-byte string literal not displayed */
}

Configuration format for the `statsd` adapter.

func (*Params) Descriptor

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

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (this *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type Params_MetricInfo

type Params_MetricInfo struct {
	Type Params_MetricInfo_Type `protobuf:"varint,1,opt,name=type,proto3,enum=adapter.statsd.config.Params_MetricInfo_Type" json:"type,omitempty"`
	// The template will be filled with values from the metric's labels and the resulting string will be used as
	// the statsd metric name. This allows easier creation of statsd metrics like `action_name-response_code`.
	// The template strings must conform to go's text/template syntax. For the example of `action_name-response_code`,
	// we use the template:
	//    `{{.apiMethod}}-{{.responseCode}}`
	//
	// If name_template is the empty string the Istio metric name will be used for statsd metric's name.
	NameTemplate string `protobuf:"bytes,2,opt,name=name_template,json=nameTemplate,proto3" json:"name_template,omitempty"`
}

Describes how to represent this metric in statsd

func (*Params_MetricInfo) Descriptor

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

func (*Params_MetricInfo) Marshal

func (m *Params_MetricInfo) Marshal() (dAtA []byte, err error)

func (*Params_MetricInfo) MarshalTo

func (m *Params_MetricInfo) MarshalTo(dAtA []byte) (int, error)

func (*Params_MetricInfo) MarshalToSizedBuffer

func (m *Params_MetricInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params_MetricInfo) ProtoMessage

func (*Params_MetricInfo) ProtoMessage()

func (*Params_MetricInfo) Reset

func (m *Params_MetricInfo) Reset()

func (*Params_MetricInfo) Size

func (m *Params_MetricInfo) Size() (n int)

func (*Params_MetricInfo) String

func (this *Params_MetricInfo) String() string

func (*Params_MetricInfo) Unmarshal

func (m *Params_MetricInfo) Unmarshal(dAtA []byte) error

func (*Params_MetricInfo) XXX_DiscardUnknown

func (m *Params_MetricInfo) XXX_DiscardUnknown()

func (*Params_MetricInfo) XXX_Marshal

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

func (*Params_MetricInfo) XXX_Merge

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

func (*Params_MetricInfo) XXX_Size

func (m *Params_MetricInfo) XXX_Size() int

func (*Params_MetricInfo) XXX_Unmarshal

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

type Params_MetricInfo_Type

type Params_MetricInfo_Type int32

The type of metric.

const (
	UNKNOWN      Params_MetricInfo_Type = 0
	COUNTER      Params_MetricInfo_Type = 1
	GAUGE        Params_MetricInfo_Type = 2
	DISTRIBUTION Params_MetricInfo_Type = 3
)

func (Params_MetricInfo_Type) EnumDescriptor

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

func (Params_MetricInfo_Type) String

func (x Params_MetricInfo_Type) String() string

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto