Documentation ¶
Index ¶
- Constants
- type Aggregation
- type DatabaseGroupProvider
- func (p *DatabaseGroupProvider) Groups(langCodes i18n.LanguageCodes, t i18n.Translator, scope, scopeID string, ...) (groups []*Group, err error)
- func (p *DatabaseGroupProvider) MappingsByID(id, scope, scopeID string, names []string, ms map[string]*metrics.MetricMeta) (gmm []*GroupMetricMap, err error)
- type DatabaseMetaProvider
- type FileGroupProvider
- type FileMetricMetaProvider
- type Filter
- type Group
- type GroupDetail
- type GroupMetricMap
- type GroupMetricMeta
- type GroupProvider
- type IndexMappingsGroupProvider
- func (p *IndexMappingsGroupProvider) Groups(langCodes i18n.LanguageCodes, t i18n.Translator, scope, scopeID string, ...) (groups []*Group, err error)
- func (p *IndexMappingsGroupProvider) MappingsByID(id, scope, scopeID string, names []string, ms map[string]*metrics.MetricMeta) (gmm []*GroupMetricMap, err error)
- type IndexMappingsMetricMetaProvider
- type Manager
- func (m *Manager) AggName(langCodes i18n.LanguageCodes, text string) string
- func (m *Manager) Close() error
- func (m *Manager) GetSingleAggregationMeta(langCodes i18n.LanguageCodes, mode, name string) (agg *Aggregation, err error)
- func (m *Manager) GetSingleMetricsMeta(langCodes i18n.LanguageCodes, scope string, scopeID string, metric string) (*metrics.MetricMeta, error)
- func (m *Manager) MetricGroup(langCodes i18n.LanguageCodes, scope, scopeID, id, mode, format string, ...) (*GroupDetail, error)
- func (m *Manager) MetricGroups(langCodes i18n.LanguageCodes, scope, scopeID, mode string) ([]*Group, error)
- func (m *Manager) MetricMeta(langCodes i18n.LanguageCodes, scope, scopeID string, names ...string) ([]*metrics.MetricMeta, error)
- func (m *Manager) MetricNames(langCodes i18n.LanguageCodes, scope, scopeID string) (names []*metrics.NameDefine, err error)
- func (m *Manager) RegeistMetricMeta(scope, scopeID, group string, metrics ...*metrics.MetricMeta) error
- func (m *Manager) Start() error
- func (m *Manager) UnregeistMetricMeta(scope, scopeID, group string, metrics ...string) error
- type MetaIndexGroupProvider
- func (p *MetaIndexGroupProvider) Groups(langCodes i18n.LanguageCodes, t i18n.Translator, scope, scopeID string, ...) (groups []*Group, err error)
- func (p *MetaIndexGroupProvider) MappingsByID(id, scope, scopeID string, names []string, ms map[string]*metrics.MetricMeta) (gmm []*GroupMetricMap, err error)
- type MetaIndexMetricMetaProvider
- type MetaMode
- type MetaSource
- type MetricMeta
- type MetricMetaProvider
- type Operation
- type TypeDefine
- type TypeName
Constants ¶
View Source
const ( InfluxFormat = "influx" DotFormat = "dot" )
formats .
View Source
const ( NumberType = "number" BoolType = "bool" StringType = "string" NumberArrayType = "number_array" StringArrayType = "string_array" BoolArrayType = "bool_array" )
type names
View Source
const (
TableMetricMeta = "sp_metric_meta"
)
tables name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregation ¶
type Aggregation struct { Aggregation string `json:"aggregation"` Name string `json:"name"` ResultType string `json:"result_type"` }
Aggregation .
type DatabaseGroupProvider ¶
type DatabaseGroupProvider struct {
// contains filtered or unexported fields
}
func (*DatabaseGroupProvider) Groups ¶
func (p *DatabaseGroupProvider) Groups(langCodes i18n.LanguageCodes, t i18n.Translator, scope, scopeID string, ms map[string]*metrics.MetricMeta) (groups []*Group, err error)
func (*DatabaseGroupProvider) MappingsByID ¶
func (p *DatabaseGroupProvider) MappingsByID(id, scope, scopeID string, names []string, ms map[string]*metrics.MetricMeta) (gmm []*GroupMetricMap, err error)
type DatabaseMetaProvider ¶
type DatabaseMetaProvider struct {
// contains filtered or unexported fields
}
func NewDatabaseMetaProvider ¶
func (*DatabaseMetaProvider) MetricMeta ¶
func (p *DatabaseMetaProvider) MetricMeta(langCodes i18n.LanguageCodes, i18n i18n.I18n, scope, scopeID string, names ...string) (map[string]*metrics.MetricMeta, error)
type FileGroupProvider ¶
type FileGroupProvider struct {
// contains filtered or unexported fields
}
FileGroupProvider .
func NewFileGroupProvider ¶
func NewFileGroupProvider(files []string, log logs.Logger) (*FileGroupProvider, error)
NewFileGroupProvider .
func (*FileGroupProvider) Groups ¶
func (p *FileGroupProvider) Groups(langCodes i18n.LanguageCodes, t i18n.Translator, scope, scopeID string, ms map[string]*metrics.MetricMeta) (groups []*Group, err error)
Groups .
func (*FileGroupProvider) MappingsByID ¶
func (p *FileGroupProvider) MappingsByID(id, scope, scopeID string, metric []string, ms map[string]*metrics.MetricMeta) (gmm []*GroupMetricMap, err error)
MappingsByID .
type FileMetricMetaProvider ¶
type FileMetricMetaProvider struct {
// contains filtered or unexported fields
}
FileMetricMetaProvider .
func NewFileMetricMetaProvider ¶
func NewFileMetricMetaProvider(path string, log logs.Logger) (*FileMetricMetaProvider, error)
NewFileMetricMetaProvider .
func (*FileMetricMetaProvider) MetricMeta ¶
func (p *FileMetricMetaProvider) MetricMeta(langCodes i18n.LanguageCodes, i i18n.I18n, scope, scopeID string, names ...string) (map[string]*metrics.MetricMeta, error)
MetricMeta .
type GroupDetail ¶
type GroupDetail struct { ID string `json:"id"` Meta *MetaMode `json:"meta"` Metrics []*GroupMetricMeta `json:"metrics"` }
type GroupMetricMap ¶
type GroupMetricMeta ¶
type GroupProvider ¶
type GroupProvider interface { MappingsByID(id, scope, scopeID string, metric []string, ms map[string]*metrics.MetricMeta) ([]*GroupMetricMap, error) Groups(langCodes i18n.LanguageCodes, t i18n.Translator, scope, scopeID string, ms map[string]*metrics.MetricMeta) ([]*Group, error) }
type IndexMappingsGroupProvider ¶
type IndexMappingsGroupProvider struct {
// contains filtered or unexported fields
}
IndexMappingsGroupProvider .
func NewIndexMappingsGroupProvider ¶
func NewIndexMappingsGroupProvider(index indexmanager.Index) (*IndexMappingsGroupProvider, error)
NewIndexMappingsGroupProvider .
func (*IndexMappingsGroupProvider) Groups ¶
func (p *IndexMappingsGroupProvider) Groups(langCodes i18n.LanguageCodes, t i18n.Translator, scope, scopeID string, ms map[string]*metrics.MetricMeta) (groups []*Group, err error)
Groups .
func (*IndexMappingsGroupProvider) MappingsByID ¶
func (p *IndexMappingsGroupProvider) MappingsByID(id, scope, scopeID string, names []string, ms map[string]*metrics.MetricMeta) (gmm []*GroupMetricMap, err error)
MappingsByID .
type IndexMappingsMetricMetaProvider ¶
type IndexMappingsMetricMetaProvider struct {
// contains filtered or unexported fields
}
IndexMappingsMetricMetaProvider .
func NewIndexMappingsMetricMetaProvider ¶
func NewIndexMappingsMetricMetaProvider(index indexmanager.Index) (*IndexMappingsMetricMetaProvider, error)
NewIndexMappingsMetricMetaProvider .
func (*IndexMappingsMetricMetaProvider) MetricMeta ¶
func (p *IndexMappingsMetricMetaProvider) MetricMeta(langCodes i18n.LanguageCodes, i i18n.I18n, scope, scopeID string, names ...string) (map[string]*metrics.MetricMeta, error)
MetricMeta .
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) AggName ¶
func (m *Manager) AggName(langCodes i18n.LanguageCodes, text string) string
AggName .
func (*Manager) GetSingleAggregationMeta ¶
func (m *Manager) GetSingleAggregationMeta(langCodes i18n.LanguageCodes, mode, name string) (agg *Aggregation, err error)
GetSingleAggregationMeta .
func (*Manager) GetSingleMetricsMeta ¶
func (m *Manager) GetSingleMetricsMeta(langCodes i18n.LanguageCodes, scope string, scopeID string, metric string) (*metrics.MetricMeta, error)
func (*Manager) MetricGroup ¶
func (m *Manager) MetricGroup(langCodes i18n.LanguageCodes, scope, scopeID, id, mode, format string, appendTags bool) (*GroupDetail, error)
func (*Manager) MetricGroups ¶
func (*Manager) MetricMeta ¶
func (m *Manager) MetricMeta(langCodes i18n.LanguageCodes, scope, scopeID string, names ...string) ([]*metrics.MetricMeta, error)
func (*Manager) MetricNames ¶
func (m *Manager) MetricNames(langCodes i18n.LanguageCodes, scope, scopeID string) (names []*metrics.NameDefine, err error)
func (*Manager) RegeistMetricMeta ¶
func (m *Manager) RegeistMetricMeta(scope, scopeID, group string, metrics ...*metrics.MetricMeta) error
type MetaIndexGroupProvider ¶
type MetaIndexGroupProvider struct {
// contains filtered or unexported fields
}
MetaIndexGroupProvider .
func NewMetaIndexGroupProvider ¶
func NewMetaIndexGroupProvider(index indexmanager.Index) (*MetaIndexGroupProvider, error)
NewMetaIndexGroupProvider .
func (*MetaIndexGroupProvider) Groups ¶
func (p *MetaIndexGroupProvider) Groups(langCodes i18n.LanguageCodes, t i18n.Translator, scope, scopeID string, ms map[string]*metrics.MetricMeta) (groups []*Group, err error)
Groups .
func (*MetaIndexGroupProvider) MappingsByID ¶
func (p *MetaIndexGroupProvider) MappingsByID(id, scope, scopeID string, names []string, ms map[string]*metrics.MetricMeta) (gmm []*GroupMetricMap, err error)
MappingsByID .
type MetaIndexMetricMetaProvider ¶
type MetaIndexMetricMetaProvider struct {
// contains filtered or unexported fields
}
MetaIndexMetricMetaProvider .
func NewMetaIndexMetricMetaProvider ¶
func NewMetaIndexMetricMetaProvider(index indexmanager.Index, log logs.Logger) (*MetaIndexMetricMetaProvider, error)
NewMetaIndexMetricMetaProvider .
func (*MetaIndexMetricMetaProvider) MetricMeta ¶
func (p *MetaIndexMetricMetaProvider) MetricMeta(langCodes i18n.LanguageCodes, i i18n.I18n, scope, scopeID string, names ...string) (map[string]*metrics.MetricMeta, error)
MetricMeta .
type MetaMode ¶
type MetaMode struct { Types map[string]*TypeDefine `json:"types"` Filters []*Operation `json:"filters,omitempty"` }
MetaMode .
type MetaSource ¶
type MetaSource string
const ( MappingsMetaSource MetaSource = "mappings" IndexMetaSource MetaSource = "index" FileMetaSource MetaSource = "file" DatabaseMetaSource MetaSource = "database" )
MetaSource values
type MetricMeta ¶
type MetricMeta struct { ID int `gorm:"column:id"` Scope string `gorm:"column:scope"` ScopeID string `gorm:"column:scope_id"` Group string `gorm:"column:group"` Metric string `gorm:"column:metric"` Name string `gorm:"column:name"` Tags string `gorm:"column:tags"` Fields string `gorm:"column:fields"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` }
func (MetricMeta) TableName ¶
func (MetricMeta) TableName() string
type MetricMetaProvider ¶
type MetricMetaProvider interface {
MetricMeta(langCodes i18n.LanguageCodes, i i18n.I18n, scope, scopeID string, names ...string) (map[string]*metrics.MetricMeta, error)
}
type Operation ¶
type Operation struct { Operation string `json:"operation"` Name string `json:"name"` Multi bool `json:"multi,omitempty"` }
Operation .
type TypeDefine ¶
type TypeDefine struct { Aggregations []*Aggregation `json:"aggregations"` Operations []*Operation `json:"operations,omitempty"` Filters []*Operation `json:"filters,omitempty"` }
TypeDefine .
Click to show internal directories.
Click to hide internal directories.