Documentation ¶
Overview ¶
Package metrics defines a set of basic building blocks for instrumenting Sonic gateways
Index ¶
- Constants
- func ConfigGetter(e config.ExtraConfig) interface{}
- func NewDummyRegistry() metrics.Registry
- func NewProxyMiddleware(layer, name string, pm *ProxyMetrics) proxy.Middleware
- type Config
- type DummyRegistry
- func (r DummyRegistry) Each(_ func(string, interface{}))
- func (r DummyRegistry) Get(_ string) interface{}
- func (r DummyRegistry) GetAll() map[string]map[string]interface{}
- func (r DummyRegistry) GetOrRegister(_ string, i interface{}) interface{}
- func (r DummyRegistry) Register(_ string, _ interface{}) error
- func (r DummyRegistry) RunHealthchecks()
- func (r DummyRegistry) Unregister(_ string)
- func (r DummyRegistry) UnregisterAll()
- type HistogramData
- type Metrics
- func (m *Metrics) BackendFactory(segmentName string, next proxy.BackendFactory) proxy.BackendFactory
- func (m *Metrics) DefaultBackendFactory() proxy.BackendFactory
- func (m *Metrics) NewProxyMiddleware(layer, name string) proxy.Middleware
- func (m *Metrics) ProxyFactory(segmentName string, next proxy.Factory) proxy.FactoryFunc
- func (m *Metrics) Snapshot() Stats
- func (m *Metrics) TakeSnapshot() Stats
- type ProxyMetrics
- type RouterMetrics
- type Stats
Constants ¶
View Source
const Namespace = "github.com/starvn/sonic/telemetry/metrics"
Variables ¶
This section is empty.
Functions ¶
func ConfigGetter ¶
func ConfigGetter(e config.ExtraConfig) interface{}
func NewDummyRegistry ¶
func NewDummyRegistry() metrics.Registry
func NewProxyMiddleware ¶
func NewProxyMiddleware(layer, name string, pm *ProxyMetrics) proxy.Middleware
Types ¶
type DummyRegistry ¶
type DummyRegistry struct{}
func (DummyRegistry) Each ¶
func (r DummyRegistry) Each(_ func(string, interface{}))
func (DummyRegistry) Get ¶
func (r DummyRegistry) Get(_ string) interface{}
func (DummyRegistry) GetAll ¶
func (r DummyRegistry) GetAll() map[string]map[string]interface{}
func (DummyRegistry) GetOrRegister ¶
func (r DummyRegistry) GetOrRegister(_ string, i interface{}) interface{}
func (DummyRegistry) Register ¶
func (r DummyRegistry) Register(_ string, _ interface{}) error
func (DummyRegistry) RunHealthchecks ¶
func (r DummyRegistry) RunHealthchecks()
func (DummyRegistry) Unregister ¶
func (r DummyRegistry) Unregister(_ string)
func (DummyRegistry) UnregisterAll ¶
func (r DummyRegistry) UnregisterAll()
type HistogramData ¶
type Metrics ¶
type Metrics struct { Config *Config Proxy *ProxyMetrics Router *RouterMetrics Registry *metrics.Registry // contains filtered or unexported fields }
func (*Metrics) BackendFactory ¶
func (m *Metrics) BackendFactory(segmentName string, next proxy.BackendFactory) proxy.BackendFactory
func (*Metrics) DefaultBackendFactory ¶
func (m *Metrics) DefaultBackendFactory() proxy.BackendFactory
func (*Metrics) NewProxyMiddleware ¶
func (m *Metrics) NewProxyMiddleware(layer, name string) proxy.Middleware
func (*Metrics) ProxyFactory ¶
func (*Metrics) TakeSnapshot ¶
type ProxyMetrics ¶
type ProxyMetrics struct {
// contains filtered or unexported fields
}
func NewProxyMetrics ¶
func NewProxyMetrics(parent *metrics.Registry) *ProxyMetrics
func (*ProxyMetrics) Counter ¶
func (rm *ProxyMetrics) Counter(labels ...string) metrics.Counter
func (*ProxyMetrics) Histogram ¶
func (rm *ProxyMetrics) Histogram(labels ...string) metrics.Histogram
type RouterMetrics ¶
type RouterMetrics struct { ProxyMetrics // contains filtered or unexported fields }
func NewRouterMetrics ¶
func NewRouterMetrics(parent *metrics.Registry) *RouterMetrics
func (*RouterMetrics) Aggregate ¶
func (rm *RouterMetrics) Aggregate()
func (*RouterMetrics) Connection ¶
func (rm *RouterMetrics) Connection(TLS *tls.ConnectionState)
func (*RouterMetrics) Disconnection ¶
func (rm *RouterMetrics) Disconnection()
func (*RouterMetrics) RegisterResponseWriterMetrics ¶
func (rm *RouterMetrics) RegisterResponseWriterMetrics(name string)
Directories ¶
Path | Synopsis |
---|---|
Package gin defines a set of basic building blocks for instrumenting Sonic gateways built using the gin router
|
Package gin defines a set of basic building blocks for instrumenting Sonic gateways built using the gin router |
Package mux defines a set of basic building blocks for instrumenting Sonic gateways built using the mux router
|
Package mux defines a set of basic building blocks for instrumenting Sonic gateways built using the mux router |
Click to show internal directories.
Click to hide internal directories.