Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCheckParameter = errors.New("failed to parse CheckArgs") ErrTheoriesParameter = errors.New("one or more theories must be supplied") ErrShutdownTimeout = errors.New("the shutdown timeout was exceeded") ErrSerialize = errors.New("failed to serialize response") ErrCheckRun = errors.New("failed to run check") )
View Source
var ( ErrEnvArgs = errors.New("failed to parse EnvArgs") ErrSessionParameter = errors.New("a session must be supplied") ErrAbsPath = errors.New("a supplied path was absolute") ErrUnsupportedVersion = errors.New("the specified version is not supported") )
View Source
var (
)
Functions ¶
func NewCL ¶
Create new compatibility shim with CompatLogger for stdlog.Logger from log.Logger
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
shared state for all api routes
func NewApi ¶
func NewApi(rcfg *eapi.RuntimeConfig) *API
func (*API) Load ¶
func (*API) Run ¶
type APICollector ¶
type APICollector struct {
// contains filtered or unexported fields
}
prometheus collector for API
func NewAPICollector ¶
func NewAPICollector() *APICollector
func (*APICollector) Collect ¶
func (ac *APICollector) Collect(ch chan<- prometheus.Metric)
func (*APICollector) Describe ¶
func (ac *APICollector) Describe(ch chan<- *prometheus.Desc)
type CompatLogger ¶
type CompatLogger struct {
// contains filtered or unexported fields
}
Compat logger for use as writer for stdlog.Logger
func (*CompatLogger) Write ¶
func (cl *CompatLogger) Write(p []byte) (n int, err error)
passthrough message to underlying logger
type CountingResponseWriter ¶
type CountingResponseWriter struct {
// contains filtered or unexported fields
}
helper for recording response size through recording written contents, goroutine safe
func (*CountingResponseWriter) Header ¶
func (crw *CountingResponseWriter) Header() http.Header
func (*CountingResponseWriter) Size ¶
func (crw *CountingResponseWriter) Size() float64
get estimated response size (headers + body)
func (*CountingResponseWriter) Write ¶
func (crw *CountingResponseWriter) Write(content []byte) (int, error)
func (*CountingResponseWriter) WriteHeader ¶
func (crw *CountingResponseWriter) WriteHeader(statusCode int)
type CountingWriter ¶
type CountingWriter struct {
// contains filtered or unexported fields
}
Helper for recording the size of written contents. CountingWriter will discards all written contents without returning an error.
func (*CountingWriter) Write ¶
func (cw *CountingWriter) Write(p []byte) (n int, err error)
Source Files
¶
- log-compat.go
- prometheus.go
- routes.go
- utils.go
Click to show internal directories.
Click to hide internal directories.