Documentation ¶
Index ¶
- func NewRTMetrics() *memmetrics.RTMetrics
- type BeSrvEntry
- type T
- func (c *T) AppendAllBeSrvRTMsTo(aggregates map[backend.SrvURLKey]BeSrvEntry)
- func (c *T) AppendBeSrvRTMTo(aggregate *memmetrics.RTMetrics, beSrvURLKey backend.SrvURLKey) error
- func (c *T) AppendFeRTMTo(aggregate *memmetrics.RTMetrics) error
- func (c *T) RTStats() (*engine.RoundTripStats, error)
- func (c *T) RemoveServer(beSrvURLKey backend.SrvURLKey)
- func (c *T) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (c *T) UpsertServer(beSrv backend.Srv)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRTMetrics ¶
func NewRTMetrics() *memmetrics.RTMetrics
NewRTMetrics is a convenience wrapper around memmetrics.NewRTMetrics() to get rid of unnecessary error check that never actually happens.
Types ¶
type BeSrvEntry ¶
type BeSrvEntry struct {
// contains filtered or unexported fields
}
BeSrvEntry used to store a backend server storage config along with respective round-trip metrics in a map.
func (*BeSrvEntry) CfgWithStats ¶
func (e *BeSrvEntry) CfgWithStats() engine.Server
CfgWithStats returns a backend server storage config along with round-trip stats.
type T ¶
type T struct {
// contains filtered or unexported fields
}
T watches and aggregates round-trip metrics for calls to its ServeHTTP function and all backend servers that handle it.
func (*T) AppendAllBeSrvRTMsTo ¶
func (c *T) AppendAllBeSrvRTMsTo(aggregates map[backend.SrvURLKey]BeSrvEntry)
AppendAllBeSrvRTMsTo appends round-trip metrics of all backend servers of the backend associated with the frontend to the respective aggregates. If an aggregate for a server is missing from the map then a new one is created.
func (*T) AppendBeSrvRTMTo ¶
AppendBeSrvRTMTo appends round-trip metrics of a backend server to aggregate. It does nothing if a server if the specified URL key does not exist.
func (*T) AppendFeRTMTo ¶
func (c *T) AppendFeRTMTo(aggregate *memmetrics.RTMetrics) error
AppendFeRTMTo appends frontend round-trip metrics to an aggregate.
func (*T) RTStats ¶
func (c *T) RTStats() (*engine.RoundTripStats, error)
RTStats returns round-trip stats of the associated frontend.
func (*T) RemoveServer ¶
RemoveServer removes a backend server from the list of servers that it collects round-trip metrics for.
func (*T) ServeHTTP ¶
func (c *T) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP implements http.Handler.
func (*T) UpsertServer ¶
UpsertServer upserts a backend server to collect round-trip metrics for.