Documentation ¶
Index ¶
- func AppendHostSink(m SinkMap, name string, hs HostSink)
- func ByteMD5(b []byte) []byte
- func FileMD5(path string) []byte
- func FilterStringMap(m map[string]string, keys []string) map[string]string
- func GetBaseConfigKeys(arr map[string]*BaseConfig) []string
- func GetFileKeys(arr map[string]*File) []string
- func GetLabelsKeys(arr map[string]Labels) []string
- func GetStringKeys(arr map[string]string) []string
- func IfDef(v, def interface{}) interface{}
- func MergeInterfacegMaps(maps ...map[string]interface{}) map[string]interface{}
- func MergeStringMaps(maps ...map[string]string) map[string]string
- func ParsePeriodFromNow(period string, t time.Time) string
- func ReadFiles(pattern string) ([]string, error)
- func RemoveEmptyStrings(items []string) []string
- func Render(def string, obj interface{}, observability *Observability) string
- func RenderTemplate(tpl *toolsRender.TextTemplate, def string, obj interface{}) (string, error)
- func SortStringMapByKeys(m map[string]string, keys []string) map[string]string
- func StringContainsAny(s string, arr []string) bool
- func StringInArr(a string, arr []string) bool
- type BaseAvailability
- type BaseAvailabilityQuery
- type BaseCondition
- type BaseConfig
- type BaseMetric
- type BaseQuality
- type Discovery
- type File
- type Files
- type HostSink
- type Labels
- type LabelsMap
- type Observability
- func (o *Observability) Debug(obj interface{}, args ...interface{})
- func (o *Observability) Error(obj interface{}, args ...interface{})
- func (o *Observability) Info(obj interface{}, args ...interface{})
- func (o *Observability) Logs() *sre.Logs
- func (o *Observability) Metrics() *sre.Metrics
- func (o *Observability) Warn(obj interface{}, args ...interface{})
- type PromDiscoveryObject
- type PrometheusOptions
- type PrometheusResponse
- type PrometheusResponseData
- type PrometheusResponseDataVector
- type Service
- type Services
- type Sink
- type SinkMap
- type SinkObject
- type Sinks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendHostSink ¶ added in v0.6.0
func FilterStringMap ¶ added in v0.6.0
func GetBaseConfigKeys ¶ added in v0.0.5
func GetBaseConfigKeys(arr map[string]*BaseConfig) []string
func GetFileKeys ¶ added in v0.3.15
func GetLabelsKeys ¶ added in v0.5.10
func GetStringKeys ¶ added in v0.0.5
func MergeInterfacegMaps ¶ added in v0.3.6
func MergeStringMaps ¶ added in v0.3.6
func ParsePeriodFromNow ¶ added in v0.5.3
func RemoveEmptyStrings ¶ added in v0.6.0
func Render ¶ added in v0.5.3
func Render(def string, obj interface{}, observability *Observability) string
func RenderTemplate ¶
func RenderTemplate(tpl *toolsRender.TextTemplate, def string, obj interface{}) (string, error)
func SortStringMapByKeys ¶ added in v0.0.5
func StringContainsAny ¶ added in v0.3.13
func StringInArr ¶
Types ¶
type BaseAvailability ¶
type BaseAvailability struct { Disabled bool `yaml:"disabled"` Queries []*BaseAvailabilityQuery `yaml:"queries"` GroupBy []string `yaml:"group_by"` Labels Labels `yaml:"labels"` }
type BaseAvailabilityQuery ¶
type BaseCondition ¶ added in v0.3.5
type BaseConfig ¶
type BaseConfig struct { Disabled bool `yaml:"disabled"` Prefix string `yaml:"prefix"` Vars map[string]string `yaml:"vars"` Labels Labels `yaml:"labels"` Conditions []*BaseCondition `yaml:"if"` Qualities []*BaseQuality `yaml:"quality"` Metrics []*BaseMetric `yaml:"metrics"` Availability *BaseAvailability `yaml:"availability"` }
func (*BaseConfig) Contains ¶ added in v0.3.18
func (bc *BaseConfig) Contains(pattern string) bool
func (*BaseConfig) LabelsExist ¶ added in v0.3.5
func (bc *BaseConfig) LabelsExist(c *BaseCondition, labels Labels) bool
func (*BaseConfig) MetricExists ¶
func (bc *BaseConfig) MetricExists(query string, labels Labels) bool
type BaseMetric ¶
type BaseQuality ¶
type LabelsMap ¶ added in v0.6.0
func ConvertSyncMapToLabelsMap ¶ added in v0.6.0
type Observability ¶
type Observability struct {
// contains filtered or unexported fields
}
func NewObservability ¶
func NewObservability(logs *sre.Logs, metrics *sre.Metrics) *Observability
func (*Observability) Debug ¶
func (o *Observability) Debug(obj interface{}, args ...interface{})
func (*Observability) Error ¶
func (o *Observability) Error(obj interface{}, args ...interface{})
func (*Observability) Info ¶
func (o *Observability) Info(obj interface{}, args ...interface{})
func (*Observability) Logs ¶
func (o *Observability) Logs() *sre.Logs
func (*Observability) Metrics ¶
func (o *Observability) Metrics() *sre.Metrics
func (*Observability) Warn ¶
func (o *Observability) Warn(obj interface{}, args ...interface{})
type PromDiscoveryObject ¶ added in v0.5.16
func GetPrometheusDiscoveriesByInstances ¶ added in v0.5.3
func GetPrometheusDiscoveriesByInstances(names string) []PromDiscoveryObject
type PrometheusOptions ¶ added in v0.5.3
type PrometheusResponse ¶ added in v0.5.3
type PrometheusResponse struct { Status string `json:"status"` Data *PrometheusResponseData `json:"data"` }
type PrometheusResponseData ¶ added in v0.5.3
type PrometheusResponseData struct { ResultType string `json:"resultType"` Result []*PrometheusResponseDataVector `json:"result"` }
type PrometheusResponseDataVector ¶ added in v0.5.3
type Services ¶ added in v0.6.0
func ConvertSyncMapToServices ¶ added in v0.6.0
type Sink ¶ added in v0.6.0
type Sink interface { Process(d Discovery, so SinkObject) Name() string Pass() []string }
type SinkMap ¶ added in v0.6.0
type SinkMap map[string]interface{}
func ConvertLabelsMapToSinkMap ¶ added in v0.6.0
func ConvertServicesToSinkMap ¶ added in v0.6.0
type SinkObject ¶ added in v0.6.0
type SinkObject interface { Map() SinkMap Options() interface{} }
Click to show internal directories.
Click to hide internal directories.