Documentation ¶
Index ¶
- Variables
- type Collector
- type DefaultCollector
- func (c *DefaultCollector) ApiErrorOccurred()
- func (c *DefaultCollector) EVMAccountInteraction(address string)
- func (c *DefaultCollector) EVMHeightIndexed(height uint64)
- func (c *DefaultCollector) MeasureRequestDuration(start time.Time, method string)
- func (c *DefaultCollector) OperatorBalance(account *flow.Account)
- func (c *DefaultCollector) ServerPanicked(reason string)
- func (c *DefaultCollector) TraceDownloadFailed()
- type HttpHandler
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var NopCollector = &nopCollector{}
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface { ApiErrorOccurred() TraceDownloadFailed() ServerPanicked(reason string) EVMHeightIndexed(height uint64) EVMAccountInteraction(address string) MeasureRequestDuration(start time.Time, method string) OperatorBalance(account *flow.Account) }
func NewCollector ¶
type DefaultCollector ¶
type DefaultCollector struct {
// contains filtered or unexported fields
}
func (*DefaultCollector) ApiErrorOccurred ¶
func (c *DefaultCollector) ApiErrorOccurred()
func (*DefaultCollector) EVMAccountInteraction ¶ added in v0.27.0
func (c *DefaultCollector) EVMAccountInteraction(address string)
func (*DefaultCollector) EVMHeightIndexed ¶ added in v0.27.0
func (c *DefaultCollector) EVMHeightIndexed(height uint64)
func (*DefaultCollector) MeasureRequestDuration ¶
func (c *DefaultCollector) MeasureRequestDuration(start time.Time, method string)
func (*DefaultCollector) OperatorBalance ¶ added in v0.31.0
func (c *DefaultCollector) OperatorBalance(account *flow.Account)
func (*DefaultCollector) ServerPanicked ¶
func (c *DefaultCollector) ServerPanicked(reason string)
func (*DefaultCollector) TraceDownloadFailed ¶ added in v0.27.0
func (c *DefaultCollector) TraceDownloadFailed()
type HttpHandler ¶
type HttpHandler struct {
// contains filtered or unexported fields
}
HttpHandler is a thin middleware for gathering metrics about http request. It makes no decision about error handling. If one occurred, we log it and pass request on to the underlying handler to make a decision
func NewMetricsHandler ¶ added in v0.27.0
func (*HttpHandler) ServeHTTP ¶
func (h *HttpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the http server that will be serving metrics requests
func NewServer ¶
NewServer creates a new server that will start on the specified port, and responds to only the `/metrics` endpoint
Click to show internal directories.
Click to hide internal directories.