Documentation ¶
Index ¶
- Variables
- func NewIngestHandler(log *logrus.Logger, st *storage.Storage, exporter storage.MetricsExporter, ...) http.Handler
- func WriteError(log *logrus.Logger, w http.ResponseWriter, code int, err error, msg string)
- func WriteErrorMessage(log *logrus.Logger, w http.ResponseWriter, code int, msg string)
- type Config
- type Controller
- type Notifier
- type RenderDiffParams
- type RenderTreeParams
- type SampleTypeConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSampleTypeMapping = map[string]*SampleTypeConfig{ "samples": { DisplayName: "cpu", Units: "samples", Sampled: true, }, "inuse_objects": { Units: "objects", Aggregation: "avg", }, "alloc_objects": { Units: "objects", Cumulative: true, }, "inuse_space": { Units: "bytes", Aggregation: "avg", }, "alloc_space": { Units: "bytes", Cumulative: true, }, }
Functions ¶
func NewIngestHandler ¶ added in v0.3.0
func WriteError ¶ added in v0.3.0
func WriteErrorMessage ¶ added in v0.3.0
Types ¶
type Config ¶ added in v0.2.1
type Config struct { Configuration *config.Server *logrus.Logger *storage.Storage Notifier // The registerer is used for exposing server metrics. MetricsRegisterer prometheus.Registerer // Exported metrics registry and exported. ExportedMetricsRegistry *prometheus.Registry storage.MetricsExporter }
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New(c Config) (*Controller, error)
func (*Controller) AppsCount ¶ added in v0.0.13
func (ctrl *Controller) AppsCount() int
func (*Controller) Drain ¶ added in v0.0.34
func (ctrl *Controller) Drain()
func (*Controller) Start ¶
func (ctrl *Controller) Start() error
func (*Controller) Stats ¶ added in v0.0.13
func (ctrl *Controller) Stats() map[string]int
func (*Controller) Stop ¶ added in v0.0.30
func (ctrl *Controller) Stop() error
type Notifier ¶ added in v0.2.2
type Notifier interface { // NotificationText returns message that will be displayed to user // on index page load. The message should point user to a critical problem. // TODO(kolesnikovae): we should poll for notifications (or subscribe). NotificationText() string }
type RenderDiffParams ¶ added in v0.0.38
type RenderDiffParams struct { Name *string `json:"name,omitempty"` Query *string `json:"query,omitempty"` From string `json:"from"` Until string `json:"until"` Format string `json:"format"` MaxNodes *int `json:"maxNodes,omitempty"` Left RenderTreeParams `json:"leftParams"` Right RenderTreeParams `json:"rightParams"` }
type RenderTreeParams ¶ added in v0.0.38
type SampleTypeConfig ¶ added in v0.3.0
type SampleTypeConfig struct { Units string `json:"units,omitempty"` DisplayName string `json:"display-name,omitempty"` // instant: Aggregation:avg && !Cumulative && !Sampled // cumulative: Aggregation:sum && Cumulative && !Sampled // delta: Aggregation:sum && !Cumulative && Sampled Aggregation string `json:"aggregation,omitempty"` Cumulative bool `json:"cumulative,omitempty"` Sampled bool `json:"sampled,omitempty"` }
TODO: dedup this with the version in scrape package
Click to show internal directories.
Click to hide internal directories.