Documentation ¶
Index ¶
- func NewExportHandler(log *logrus.Logger) http.HandlerFunc
- func NewIndexHandler(log *logrus.Logger, s storage.AppNameGetter, dir http.FileSystem, ...) http.Handler
- func NewIngestHandler(log *logrus.Logger, p Parser, onSuccess func(pi *parser.PutInput)) http.Handler
- func NewLabelValuesHandler(log *logrus.Logger, s storage.LabelValuesGetter) http.HandlerFunc
- func NewLabelsHandler(log *logrus.Logger, s storage.LabelsGetter) http.HandlerFunc
- 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)
- func WriteInternalServerError(log *logrus.Logger, w http.ResponseWriter, err error, msg string)
- func WriteInvalidMethodError(log *logrus.Logger, w http.ResponseWriter)
- func WriteInvalidParameterError(log *logrus.Logger, w http.ResponseWriter, err error)
- func WriteJSONEncodeError(log *logrus.Logger, w http.ResponseWriter, err error)
- func WriteResponseFile(_ *logrus.Logger, w http.ResponseWriter, filename string, content []byte)
- func WriteResponseJSON(log *logrus.Logger, w http.ResponseWriter, res interface{})
- type Config
- type Controller
- type Flags
- type IndexHandler
- type IndexHandlerConfig
- type MergeHandler
- type Notifier
- type Parser
- type Payload
- type RenderDiffHandler
- type RenderDiffParams
- type RenderDiffResponse
- type RenderHandler
- type RenderResponse
- type RenderTreeParams
- type StatsReceiver
- type TargetsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExportHandler ¶ added in v0.14.0
func NewExportHandler(log *logrus.Logger) http.HandlerFunc
func NewIndexHandler ¶ added in v0.14.0
func NewIndexHandler(log *logrus.Logger, s storage.AppNameGetter, dir http.FileSystem, stats StatsReceiver, notifier Notifier, cfg *IndexHandlerConfig) http.Handler
func NewIngestHandler ¶ added in v0.3.0
func NewLabelValuesHandler ¶ added in v0.14.0
func NewLabelValuesHandler(log *logrus.Logger, s storage.LabelValuesGetter) http.HandlerFunc
func NewLabelsHandler ¶ added in v0.14.0
func NewLabelsHandler(log *logrus.Logger, s storage.LabelsGetter) http.HandlerFunc
func WriteError ¶ added in v0.3.0
func WriteErrorMessage ¶ added in v0.3.0
func WriteInternalServerError ¶ added in v0.14.0
func WriteInvalidMethodError ¶ added in v0.14.0
func WriteInvalidMethodError(log *logrus.Logger, w http.ResponseWriter)
func WriteInvalidParameterError ¶ added in v0.14.0
func WriteInvalidParameterError(log *logrus.Logger, w http.ResponseWriter, err error)
func WriteJSONEncodeError ¶ added in v0.14.0
func WriteJSONEncodeError(log *logrus.Logger, w http.ResponseWriter, err error)
func WriteResponseFile ¶ added in v0.14.0
func WriteResponseJSON ¶ added in v0.14.0
func WriteResponseJSON(log *logrus.Logger, w http.ResponseWriter, res interface{})
Types ¶
type Config ¶ added in v0.2.1
type Config struct { Configuration *config.Server *logrus.Logger *storage.Storage *gorm.DB Notifier // The registerer is used for exposing server metrics. MetricsRegisterer prometheus.Registerer // Exported metrics registry and exported. ExportedMetricsRegistry *prometheus.Registry storage.MetricsExporter Adhoc adhocserver.Server ScrapeManager *scrape.Manager }
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) StatsInc ¶ added in v0.14.0
func (ctrl *Controller) StatsInc(name string)
func (*Controller) Stop ¶ added in v0.0.30
func (ctrl *Controller) Stop() error
type IndexHandler ¶ added in v0.14.0
type IndexHandler struct {
// contains filtered or unexported fields
}
func (*IndexHandler) ServeHTTP ¶ added in v0.14.0
func (ih *IndexHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type IndexHandlerConfig ¶ added in v0.14.0
type MergeHandler ¶ added in v0.14.0
type MergeHandler struct {
// contains filtered or unexported fields
}
func NewMergeHandler ¶ added in v0.14.0
func NewMergeHandler(l *logrus.Logger, s storage.Merger, dir http.FileSystem, stats StatsReceiver, maxNodesDefault int) *MergeHandler
func (*MergeHandler) ServeHTTP ¶ added in v0.14.0
func (mh *MergeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
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 RenderDiffHandler ¶ added in v0.14.0
type RenderDiffHandler struct {
// contains filtered or unexported fields
}
func NewRenderDiffHandler ¶ added in v0.14.0
func NewRenderDiffHandler(l *logrus.Logger, s storage.Getter, dir http.FileSystem, stats StatsReceiver, maxNodesDefault int) *RenderDiffHandler
func (*RenderDiffHandler) ServeHTTP ¶ added in v0.14.0
func (rh *RenderDiffHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RenderDiffParams ¶ added in v0.0.38
type RenderDiffParams struct { LeftQuery string `json:"leftQuery"` LeftFrom string `json:"leftFrom"` LeftUntil string `json:"leftUntil"` RightQuery string `json:"rightQuery"` RightFrom string `json:"rightFrom"` RightUntil string `json:"rightUntil"` Format string `json:"format"` MaxNodes *int `json:"maxNodes,omitempty"` }
RenderDiffParams refers to the params accepted by the renderDiffHandler
type RenderDiffResponse ¶ added in v0.14.0
type RenderDiffResponse struct {
*flamebearer.FlamebearerProfile
}
RenderDiffResponse refers to the response of the renderDiffHandler
type RenderHandler ¶ added in v0.14.0
type RenderHandler struct {
// contains filtered or unexported fields
}
func NewRenderHandler ¶ added in v0.14.0
func NewRenderHandler(l *logrus.Logger, s storage.Getter, dir http.FileSystem, stats StatsReceiver, maxNodesDefault int) *RenderHandler
func (*RenderHandler) ServeHTTP ¶ added in v0.14.0
func (rh *RenderHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RenderResponse ¶ added in v0.7.0
type RenderResponse struct { flamebearer.FlamebearerProfile Metadata renderMetadataResponse `json:"metadata"` }
type RenderTreeParams ¶ added in v0.0.38
type StatsReceiver ¶ added in v0.14.0
type StatsReceiver interface {
StatsInc(name string)
}
type TargetsResponse ¶ added in v0.11.0
type TargetsResponse struct { Job string `json:"job"` TargetURL string `json:"url"` DiscoveredLabels labels.Labels `json:"discoveredLabels"` Labels labels.Labels `json:"labels"` Health scrape.TargetHealth `json:"health"` LastScrape time.Time `json:"lastScrape"` LastError string `json:"lastError"` LastScrapeDuration string `json:"lastScrapeDuration"` }
Click to show internal directories.
Click to hide internal directories.