Documentation ¶
Index ¶
- Constants
- Variables
- func GetMetricViewWithLabels(ctx context.Context, tbl string, lbls []string) *table.View
- func GetSchemaForAccount(ctx context.Context, account string) []string
- func InitMetric(ctx context.Context, ieFactory func() ie.InternalExecutor, ...)
- func InitSchema(ctx context.Context, ieFactory func() ie.InternalExecutor) error
- func NewMetricView(tbl string, opts ...table.ViewOption) *table.View
- func NewMetricViewWithLabels(ctx context.Context, tbl string, lbls []string) *table.View
- func StopMetricSync()
- type ExportMultiTable
- type InitOption
- type InitOptions
- type MetricCollector
- type StatsLogWriter
- type WithFlushInterval
- type WithMetricThreshold
- type WithSampleThreshold
- type WithSqlWorkerNum
Constants ¶
View Source
const ( MetricDBConst = metric.MetricDBConst SqlCreateDBConst = "create database if not exists " + MetricDBConst SqlDropDBConst = "drop database if exists " + MetricDBConst ALL_IN_ONE_MODE = "monolithic" )
View Source
const CHAN_CAPACITY = 10000
Variables ¶
View Source
var SingleMetricTable = &table.Table{ Account: table.AccountSys, Database: MetricDBConst, Table: `metric`, Columns: []table.Column{metricNameColumn, metricCollectTimeColumn, metricValueColumn, metricNodeColumn, metricRoleColumn, metricAccountColumn, metricTypeColumn}, PrimaryKeyColumn: []table.Column{}, ClusterBy: []table.Column{metricCollectTimeColumn, metricNameColumn, metricAccountColumn}, Engine: table.NormalTableEngine, Comment: `metric data`, PathBuilder: table.NewAccountDatePathBuilder(), AccountColumn: &metricAccountColumn, SupportUserAccess: true, SupportConstAccess: true, }
Functions ¶
func GetMetricViewWithLabels ¶
func GetSchemaForAccount ¶
GetSchemaForAccount return account's table, and view's schema
func InitMetric ¶
func InitMetric(ctx context.Context, ieFactory func() ie.InternalExecutor, SV *config.ObservabilityParameters, nodeUUID, role string, opts ...InitOption)
func InitSchema ¶
func InitSchema(ctx context.Context, ieFactory func() ie.InternalExecutor) error
func NewMetricView ¶
func NewMetricView(tbl string, opts ...table.ViewOption) *table.View
func NewMetricViewWithLabels ¶
func StopMetricSync ¶
func StopMetricSync()
Types ¶
type ExportMultiTable ¶
type ExportMultiTable bool
func (ExportMultiTable) ApplyTo ¶
func (x ExportMultiTable) ApplyTo(o *collectorOpts)
type InitOption ¶
type InitOption func(*InitOptions)
func WithInitAction ¶
func WithInitAction(init bool) InitOption
func WithWriterFactory ¶
func WithWriterFactory(factory table.WriterFactory) InitOption
func (InitOption) ApplyTo ¶
func (f InitOption) ApplyTo(opts *InitOptions)
type InitOptions ¶
type InitOptions struct {
// contains filtered or unexported fields
}
type MetricCollector ¶
type StatsLogWriter ¶
type StatsLogWriter struct {
// contains filtered or unexported fields
}
func (*StatsLogWriter) Stop ¶
func (e *StatsLogWriter) Stop(_ bool) (<-chan struct{}, bool)
type WithFlushInterval ¶
func (WithFlushInterval) ApplyTo ¶
func (x WithFlushInterval) ApplyTo(o *collectorOpts)
type WithMetricThreshold ¶
type WithMetricThreshold int
func (WithMetricThreshold) ApplyTo ¶
func (x WithMetricThreshold) ApplyTo(o *collectorOpts)
type WithSampleThreshold ¶
type WithSampleThreshold int
func (WithSampleThreshold) ApplyTo ¶
func (x WithSampleThreshold) ApplyTo(o *collectorOpts)
type WithSqlWorkerNum ¶
type WithSqlWorkerNum int
func (WithSqlWorkerNum) ApplyTo ¶
func (x WithSqlWorkerNum) ApplyTo(o *collectorOpts)
Click to show internal directories.
Click to hide internal directories.