Documentation ¶
Index ¶
- Constants
- type APIStatMetrics
- func (a *APIStatMetrics) Collect(ch chan<- prometheus.Metric)
- func (a *APIStatMetrics) CurrentS3RequestsDec(api string)
- func (a *APIStatMetrics) CurrentS3RequestsInc(api string)
- func (a *APIStatMetrics) Describe(ch chan<- *prometheus.Desc)
- func (a *APIStatMetrics) RequestDurationsUpdate(api string, durationSecs float64)
- func (a *APIStatMetrics) TotalInputBytesAdd(val uint64)
- func (a *APIStatMetrics) TotalOutputBytesAdd(val uint64)
- func (a *APIStatMetrics) TotalS3ErrorsInc(api string)
- func (a *APIStatMetrics) TotalS3RequestsInc(api string)
- type AppMetrics
- func (m *AppMetrics) Gather() ([]*dto.MetricFamily, error)
- func (m *AppMetrics) Handler() http.Handler
- func (m *AppMetrics) MarkHealthy(endpoint string)
- func (m *AppMetrics) MarkUnhealthy(endpoint string)
- func (m *AppMetrics) SetEnabled(enabled bool)
- func (m *AppMetrics) Shutdown()
- func (m *AppMetrics) State() *StateMetrics
- func (m *AppMetrics) Statistic() *APIStatMetrics
- func (m *AppMetrics) UsersAPIStats() *UsersAPIStats
- type AppMetricsConfig
- type Description
- type GateMetrics
- type HealthStatus
- type OperationList
- type RequestType
- type StateMetrics
- type StatisticScraper
- type TrafficType
- type UserBucketInfo
- type UserMetrics
- type UserMetricsInfo
- type UserTrafficMetricsInfo
- type UsersAPIStats
Constants ¶
View Source
const ( INDirection = "IN" OUTDirection = "OUT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIStatMetrics ¶ added in v0.28.0
type APIStatMetrics struct {
// contains filtered or unexported fields
}
func (*APIStatMetrics) Collect ¶ added in v0.28.0
func (a *APIStatMetrics) Collect(ch chan<- prometheus.Metric)
func (*APIStatMetrics) CurrentS3RequestsDec ¶ added in v0.28.0
func (a *APIStatMetrics) CurrentS3RequestsDec(api string)
func (*APIStatMetrics) CurrentS3RequestsInc ¶ added in v0.28.0
func (a *APIStatMetrics) CurrentS3RequestsInc(api string)
func (*APIStatMetrics) Describe ¶ added in v0.28.0
func (a *APIStatMetrics) Describe(ch chan<- *prometheus.Desc)
func (*APIStatMetrics) RequestDurationsUpdate ¶ added in v0.28.0
func (a *APIStatMetrics) RequestDurationsUpdate(api string, durationSecs float64)
func (*APIStatMetrics) TotalInputBytesAdd ¶ added in v0.28.0
func (a *APIStatMetrics) TotalInputBytesAdd(val uint64)
func (*APIStatMetrics) TotalOutputBytesAdd ¶ added in v0.28.0
func (a *APIStatMetrics) TotalOutputBytesAdd(val uint64)
func (*APIStatMetrics) TotalS3ErrorsInc ¶ added in v0.28.0
func (a *APIStatMetrics) TotalS3ErrorsInc(api string)
func (*APIStatMetrics) TotalS3RequestsInc ¶ added in v0.28.0
func (a *APIStatMetrics) TotalS3RequestsInc(api string)
type AppMetrics ¶
type AppMetrics struct {
// contains filtered or unexported fields
}
func NewAppMetrics ¶
func NewAppMetrics(cfg AppMetricsConfig) *AppMetrics
func (*AppMetrics) Gather ¶ added in v0.28.0
func (m *AppMetrics) Gather() ([]*dto.MetricFamily, error)
func (*AppMetrics) Handler ¶
func (m *AppMetrics) Handler() http.Handler
func (*AppMetrics) MarkHealthy ¶ added in v0.28.0
func (m *AppMetrics) MarkHealthy(endpoint string)
func (*AppMetrics) MarkUnhealthy ¶ added in v0.28.0
func (m *AppMetrics) MarkUnhealthy(endpoint string)
func (*AppMetrics) SetEnabled ¶
func (m *AppMetrics) SetEnabled(enabled bool)
func (*AppMetrics) Shutdown ¶
func (m *AppMetrics) Shutdown()
func (*AppMetrics) State ¶ added in v0.28.0
func (m *AppMetrics) State() *StateMetrics
func (*AppMetrics) Statistic ¶ added in v0.28.0
func (m *AppMetrics) Statistic() *APIStatMetrics
func (*AppMetrics) UsersAPIStats ¶ added in v0.29.0
func (m *AppMetrics) UsersAPIStats() *UsersAPIStats
type AppMetricsConfig ¶ added in v0.29.0
type AppMetricsConfig struct { Logger *zap.Logger PoolStatistics StatisticScraper Registerer prometheus.Registerer Enabled bool }
type Description ¶ added in v0.28.0
type Description struct { Type dto.MetricType Namespace string Subsystem string Name string Help string ConstantLabels prometheus.Labels VariableLabels []string }
func DescribeAll ¶ added in v0.28.0
func DescribeAll() []Description
DescribeAll returns descriptions for metrics.
func (*Description) BuildFQName ¶ added in v0.28.0
func (d *Description) BuildFQName() string
func (*Description) MarshalJSON ¶ added in v0.28.0
func (d *Description) MarshalJSON() ([]byte, error)
type GateMetrics ¶
type GateMetrics struct { State *StateMetrics Pool *poolMetricsCollector Billing *billingMetrics Stats *APIStatMetrics HTTPServer *httpServerMetrics // contains filtered or unexported fields }
func NewGateMetrics ¶
func NewGateMetrics(scraper StatisticScraper, registry prometheus.Registerer) *GateMetrics
func (*GateMetrics) Gather ¶ added in v0.28.0
func (g *GateMetrics) Gather() ([]*dto.MetricFamily, error)
func (*GateMetrics) Handler ¶
func (g *GateMetrics) Handler() http.Handler
func (*GateMetrics) Unregister ¶
func (g *GateMetrics) Unregister()
type HealthStatus ¶
type HealthStatus int32
HealthStatus of the gate application.
const ( HealthStatusUndefined HealthStatus = 0 HealthStatusStarting HealthStatus = 1 HealthStatusReady HealthStatus = 2 HealthStatusShuttingDown HealthStatus = 3 )
type OperationList ¶
type OperationList [6]int
type RequestType ¶ added in v0.28.0
type RequestType int
const ( UNKNOWNRequest RequestType = iota HEADRequest RequestType = iota PUTRequest RequestType = iota LISTRequest RequestType = iota GETRequest RequestType = iota DELETERequest RequestType = iota )
func (RequestType) String ¶ added in v0.28.0
func (t RequestType) String() string
type StateMetrics ¶ added in v0.28.0
type StateMetrics struct {
// contains filtered or unexported fields
}
func (*StateMetrics) Collect ¶ added in v0.28.0
func (m *StateMetrics) Collect(ch chan<- prometheus.Metric)
func (*StateMetrics) Describe ¶ added in v0.28.0
func (m *StateMetrics) Describe(desc chan<- *prometheus.Desc)
func (*StateMetrics) SetHealth ¶ added in v0.28.0
func (m *StateMetrics) SetHealth(s HealthStatus)
func (*StateMetrics) SetVersion ¶ added in v0.28.0
func (m *StateMetrics) SetVersion(ver string)
type StatisticScraper ¶
type TrafficType ¶
type TrafficType int
const ( UnknownTraffic TrafficType = iota INTraffic TrafficType = iota OUTTraffic TrafficType = iota )
func (TrafficType) String ¶
func (t TrafficType) String() string
type UserBucketInfo ¶
type UserMetrics ¶
type UserMetrics struct { Requests []UserMetricsInfo Traffic []UserTrafficMetricsInfo }
type UserMetricsInfo ¶
type UserMetricsInfo struct { UserBucketInfo Operation RequestType Requests int }
type UserTrafficMetricsInfo ¶
type UserTrafficMetricsInfo struct { UserBucketInfo Type TrafficType Value uint64 }
type UsersAPIStats ¶
func (*UsersAPIStats) DumpMetrics ¶
func (u *UsersAPIStats) DumpMetrics() UserMetrics
func (*UsersAPIStats) Update ¶
func (u *UsersAPIStats) Update(user, bucket, cnrID, ns string, reqType RequestType, in, out uint64)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.