proto

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default_SurfacerConf_MetricsBufferSize = int64(10000)
	Default_SurfacerConf_MetricsBatchSize  = int32(1)
	Default_SurfacerConf_BatchTimerSec     = int32(1)
)

Default values for SurfacerConf fields.

Variables

View Source
var File_github_com_cloudprober_cloudprober_surfacers_internal_postgres_proto_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type LabelToColumn

type LabelToColumn struct {

	// Label name
	Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"`
	// Column to map this label to:
	Column *string `protobuf:"bytes,2,req,name=column" json:"column,omitempty"`
	// contains filtered or unexported fields
}

func (*LabelToColumn) Descriptor deprecated

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

Deprecated: Use LabelToColumn.ProtoReflect.Descriptor instead.

func (*LabelToColumn) GetColumn

func (x *LabelToColumn) GetColumn() string

func (*LabelToColumn) GetLabel

func (x *LabelToColumn) GetLabel() string

func (*LabelToColumn) ProtoMessage

func (*LabelToColumn) ProtoMessage()

func (*LabelToColumn) ProtoReflect

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

func (*LabelToColumn) Reset

func (x *LabelToColumn) Reset()

func (*LabelToColumn) String

func (x *LabelToColumn) String() string

type SurfacerConf

type SurfacerConf struct {

	// Postgres connection string.
	// Example:
	//
	//	"postgresql://root:${PASSWORD}@localhost/cloudprober?sslmode=disable"
	ConnectionString *string `protobuf:"bytes,1,req,name=connection_string,json=connectionString" json:"connection_string,omitempty"`
	// Metrics table name.
	// To create table (when storing all labels in single column in JSON format):
	// CREATE TABLE metrics (
	//
	//	time timestamp, metric_name varchar(80), value float8, labels jsonb
	//
	// )
	MetricsTableName *string `protobuf:"bytes,2,req,name=metrics_table_name,json=metricsTableName" json:"metrics_table_name,omitempty"`
	// Adding label_to_column fields changes how labels are stored in a Postgres
	// table. If this field is not specified at all, all the labels are stored as
	// jsonb values as the 'labels' column (this mode impacts performance
	// negatively). If label_to_colum entries are specified for some labels,
	// those labels are stored in their dedicated columns; all the labels that
	// don't have a mapping will be dropped.
	LabelToColumn     []*LabelToColumn `protobuf:"bytes,4,rep,name=label_to_column,json=labelToColumn" json:"label_to_column,omitempty"`
	MetricsBufferSize *int64           `protobuf:"varint,3,opt,name=metrics_buffer_size,json=metricsBufferSize,def=10000" json:"metrics_buffer_size,omitempty"`
	// The maximum number of metric events will be commited in one transaction at one
	// time. Metrics will be stored locally until this limit is reached. Metrics will
	// be commited  to postgres when the timer expires, or the buffer is full, whichever
	// happens first.
	MetricsBatchSize *int32 `protobuf:"varint,5,opt,name=metrics_batch_size,json=metricsBatchSize,def=1" json:"metrics_batch_size,omitempty"`
	// The maximum amount of time to hold metrics in the buffer (above).
	// Metrics will be commited  to postgres when the timer expires, or the buffer is full,
	// whichever happens first.
	BatchTimerSec *int32 `protobuf:"varint,6,opt,name=batch_timer_sec,json=batchTimerSec,def=1" json:"batch_timer_sec,omitempty"`
	// contains filtered or unexported fields
}

func (*SurfacerConf) Descriptor deprecated

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

Deprecated: Use SurfacerConf.ProtoReflect.Descriptor instead.

func (*SurfacerConf) GetBatchTimerSec added in v0.13.4

func (x *SurfacerConf) GetBatchTimerSec() int32

func (*SurfacerConf) GetConnectionString

func (x *SurfacerConf) GetConnectionString() string

func (*SurfacerConf) GetLabelToColumn

func (x *SurfacerConf) GetLabelToColumn() []*LabelToColumn

func (*SurfacerConf) GetMetricsBatchSize added in v0.13.4

func (x *SurfacerConf) GetMetricsBatchSize() int32

func (*SurfacerConf) GetMetricsBufferSize

func (x *SurfacerConf) GetMetricsBufferSize() int64

func (*SurfacerConf) GetMetricsTableName

func (x *SurfacerConf) GetMetricsTableName() string

func (*SurfacerConf) ProtoMessage

func (*SurfacerConf) ProtoMessage()

func (*SurfacerConf) ProtoReflect

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

func (*SurfacerConf) Reset

func (x *SurfacerConf) Reset()

func (*SurfacerConf) String

func (x *SurfacerConf) String() string

Jump to

Keyboard shortcuts

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