Documentation ¶
Index ¶
- Constants
- type AggLog
- type ApplyEvent
- type ApplyPromConfig
- type GroupWithMetricsList
- type Journal
- func (ms *Journal) HandleGetMetrics(_ context.Context, hctx *rpc.HandlerContext, args tlstatshouse.GetMetrics2) error
- func (ms *Journal) HandleGetMetrics3(_ context.Context, hctx *rpc.HandlerContext, args tlstatshouse.GetMetrics3) error
- func (ms *Journal) LoadJournal(ctx context.Context, lastVersion int64, returnIfEmpty bool) ([]tlmetadata.Event, int64, error)
- func (ms *Journal) Start(sh2 *agent.Agent, a AggLog, metaLoader MetricsStorageLoader)
- func (ms *Journal) StateHash() string
- func (ms *Journal) Version() int64
- func (ms *Journal) WaitVersion(ctx context.Context, version int64) error
- type MetadataMock
- type MetricMetaLoader
- func (l *MetricMetaLoader) GetTagMapping(ctx context.Context, tag string, metricName string, create bool) (int32, int32, time.Duration, error)
- func (l *MetricMetaLoader) LoadJournal(ctx context.Context, lastVersion int64, returnIfEmpty bool) ([]tlmetadata.Event, int64, error)
- func (l *MetricMetaLoader) LoadOrCreateMapping(ctxParent context.Context, key string, metricName interface{}) (pcache.Value, time.Duration, error)
- func (l *MetricMetaLoader) PutTagMapping(ctx context.Context, tag string, id int32) error
- func (l *MetricMetaLoader) ResetFlood(ctx context.Context, metricName string) (bool, error)
- func (l *MetricMetaLoader) SaveDashboard(ctx context.Context, value format.DashboardMeta, create, remove bool) (format.DashboardMeta, error)
- func (l *MetricMetaLoader) SaveMetric(ctx context.Context, value format.MetricMetaValue) (m format.MetricMetaValue, _ error)
- func (l *MetricMetaLoader) SaveMetricsGroup(ctx context.Context, value format.MetricsGroup, create, delete bool) (g format.MetricsGroup, _ error)
- func (l *MetricMetaLoader) SavePromConfig(ctx context.Context, version int64, config string) (tlmetadata.Event, error)
- type MetricsStorage
- func (ms *MetricsStorage) ApplyEvent(newEntries []tlmetadata.Event)
- func (ms *MetricsStorage) GetDashboardList() []*format.DashboardMeta
- func (ms *MetricsStorage) GetDashboardMeta(dashboardID int32) *format.DashboardMeta
- func (ms *MetricsStorage) GetGroup(id int32) *format.MetricsGroup
- func (ms *MetricsStorage) GetGroupWithMetricsList(id int32) (GroupWithMetricsList, bool)
- func (ms *MetricsStorage) GetGroupsList() []*format.MetricsGroup
- func (ms *MetricsStorage) GetMetaMetric(metricID int32) *format.MetricMetaValue
- func (ms *MetricsStorage) GetMetaMetricByName(metricName string) *format.MetricMetaValue
- func (ms *MetricsStorage) GetMetaMetricByNameBytes(metric []byte) *format.MetricMetaValue
- func (ms *MetricsStorage) GetMetaMetricList(includeInvisible bool) []*format.MetricMetaValue
- func (ms *MetricsStorage) Journal() *Journal
- func (ms *MetricsStorage) PromConfig() tlmetadata.Event
- func (ms *MetricsStorage) StateHash() string
- func (ms *MetricsStorage) Version() int64
- type MetricsStorageLoader
- type MetricsVersionClient
- type MetricsVersionClient3
Constants ¶
View Source
const (
DefaultMetaTimeout = 2 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyEvent ¶
type ApplyEvent func(newEntries []tlmetadata.Event)
type ApplyPromConfig ¶
type GroupWithMetricsList ¶
type GroupWithMetricsList struct { Group *format.MetricsGroup Metrics []string }
type Journal ¶
type Journal struct { MetricsMu sync.Mutex BuiltinLongPollImmediateOK data_model.ItemValue BuiltinLongPollImmediateError data_model.ItemValue BuiltinLongPollEnqueue data_model.ItemValue BuiltinLongPollDelayedOK data_model.ItemValue BuiltinLongPollDelayedError data_model.ItemValue BuiltinJournalUpdateOK data_model.ItemValue BuiltinJournalUpdateError data_model.ItemValue // contains filtered or unexported fields }
func MakeJournal ¶
func MakeJournal(namespaceSuffix string, dc *pcache.DiskCache, applyEvent ApplyEvent) *Journal
func (*Journal) HandleGetMetrics ¶
func (ms *Journal) HandleGetMetrics(_ context.Context, hctx *rpc.HandlerContext, args tlstatshouse.GetMetrics2) error
func (*Journal) HandleGetMetrics3 ¶
func (ms *Journal) HandleGetMetrics3(_ context.Context, hctx *rpc.HandlerContext, args tlstatshouse.GetMetrics3) error
func (*Journal) LoadJournal ¶
type MetadataMock ¶
func NewMetadataMock ¶
func NewMetadataMock() *MetadataMock
func (*MetadataMock) Handle ¶
func (m *MetadataMock) Handle(ctx context.Context, hctx *rpc.HandlerContext) error
type MetricMetaLoader ¶
type MetricMetaLoader struct {
// contains filtered or unexported fields
}
func NewMetricMetaLoader ¶
func NewMetricMetaLoader(client *tlmetadata.Client, loadTimeout time.Duration) *MetricMetaLoader
func (*MetricMetaLoader) GetTagMapping ¶
func (*MetricMetaLoader) LoadJournal ¶
func (l *MetricMetaLoader) LoadJournal(ctx context.Context, lastVersion int64, returnIfEmpty bool) ([]tlmetadata.Event, int64, error)
func (*MetricMetaLoader) LoadOrCreateMapping ¶
func (l *MetricMetaLoader) LoadOrCreateMapping(ctxParent context.Context, key string, metricName interface{}) (pcache.Value, time.Duration, error)
adapter for disk cache
func (*MetricMetaLoader) PutTagMapping ¶
func (*MetricMetaLoader) ResetFlood ¶
func (*MetricMetaLoader) SaveDashboard ¶
func (l *MetricMetaLoader) SaveDashboard(ctx context.Context, value format.DashboardMeta, create, remove bool) (format.DashboardMeta, error)
func (*MetricMetaLoader) SaveMetric ¶
func (l *MetricMetaLoader) SaveMetric(ctx context.Context, value format.MetricMetaValue) (m format.MetricMetaValue, _ error)
func (*MetricMetaLoader) SaveMetricsGroup ¶
func (l *MetricMetaLoader) SaveMetricsGroup(ctx context.Context, value format.MetricsGroup, create, delete bool) (g format.MetricsGroup, _ error)
func (*MetricMetaLoader) SavePromConfig ¶
func (l *MetricMetaLoader) SavePromConfig(ctx context.Context, version int64, config string) (tlmetadata.Event, error)
type MetricsStorage ¶
type MetricsStorage struct {
// contains filtered or unexported fields
}
func MakeMetricsStorage ¶
func MakeMetricsStorage(namespaceSuffix string, dc *pcache.DiskCache, applyPromConfig ApplyPromConfig) *MetricsStorage
func (*MetricsStorage) ApplyEvent ¶
func (ms *MetricsStorage) ApplyEvent(newEntries []tlmetadata.Event)
func (*MetricsStorage) GetDashboardList ¶
func (ms *MetricsStorage) GetDashboardList() []*format.DashboardMeta
func (*MetricsStorage) GetDashboardMeta ¶
func (ms *MetricsStorage) GetDashboardMeta(dashboardID int32) *format.DashboardMeta
func (*MetricsStorage) GetGroup ¶
func (ms *MetricsStorage) GetGroup(id int32) *format.MetricsGroup
func (*MetricsStorage) GetGroupWithMetricsList ¶
func (ms *MetricsStorage) GetGroupWithMetricsList(id int32) (GroupWithMetricsList, bool)
func (*MetricsStorage) GetGroupsList ¶
func (ms *MetricsStorage) GetGroupsList() []*format.MetricsGroup
func (*MetricsStorage) GetMetaMetric ¶
func (ms *MetricsStorage) GetMetaMetric(metricID int32) *format.MetricMetaValue
func (*MetricsStorage) GetMetaMetricByName ¶
func (ms *MetricsStorage) GetMetaMetricByName(metricName string) *format.MetricMetaValue
func (*MetricsStorage) GetMetaMetricByNameBytes ¶
func (ms *MetricsStorage) GetMetaMetricByNameBytes(metric []byte) *format.MetricMetaValue
func (*MetricsStorage) GetMetaMetricList ¶
func (ms *MetricsStorage) GetMetaMetricList(includeInvisible bool) []*format.MetricMetaValue
func (*MetricsStorage) Journal ¶
func (ms *MetricsStorage) Journal() *Journal
func (*MetricsStorage) PromConfig ¶
func (ms *MetricsStorage) PromConfig() tlmetadata.Event
func (*MetricsStorage) StateHash ¶
func (ms *MetricsStorage) StateHash() string
func (*MetricsStorage) Version ¶
func (ms *MetricsStorage) Version() int64
satisfy format.MetaStorageInterface
type MetricsStorageLoader ¶
type MetricsVersionClient ¶
type MetricsVersionClient struct {
// contains filtered or unexported fields
}
type MetricsVersionClient3 ¶
type MetricsVersionClient3 struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.