Documentation
¶
Index ¶
- func Mount(target route.Target, runtimes ...*state)
- func Provider(config Config, options ...Option) runaprovider.Provider
- type Checker
- func Cache(app runaprovider.Context, name string) Checker
- func Database(app runaprovider.Context, name string) Checker
- func Host(app runaprovider.Context, name string) Checker
- func Queue(app runaprovider.Context, name string) Checker
- func Self() Checker
- func Storage(app runaprovider.Context, name string) Checker
- type CheckerFunc
- type Config
- type Exporter
- type ExporterFunc
- type Installer
- type InstallerFunc
- type Option
- type Registry
- type Report
- type Result
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Checker ¶
Checker checks one runtime dependency or subsystem.
func Cache ¶
func Cache(app runaprovider.Context, name string) Checker
Cache returns a checker for a named cache pool.
func Database ¶
func Database(app runaprovider.Context, name string) Checker
Database returns a checker for a named database runtime.
func Host ¶
func Host(app runaprovider.Context, name string) Checker
Host returns a checker that reads a host unit status.
type CheckerFunc ¶
CheckerFunc adapts a function to Checker.
func (CheckerFunc) Check ¶
func (fn CheckerFunc) Check(ctx context.Context) Result
Check runs the checker function.
func (CheckerFunc) Name ¶
func (fn CheckerFunc) Name() string
Name returns the default checker name.
type Config ¶
type Config struct {
Service string `toml:"service"`
Env string `toml:"env"`
Version string `toml:"version"`
Timeout time.Duration `toml:"timeout"`
Mount string `toml:"mount"`
Debug bool `toml:"debug"`
}
Config configures the observe provider.
type Exporter ¶
Exporter renders metrics for an HTTP request.
func DefaultMetrics ¶
func DefaultMetrics() Exporter
DefaultMetrics returns lightweight built-in metrics.
func TextMetrics ¶
TextMetrics creates a simple text metrics exporter.
type ExporterFunc ¶
ExporterFunc adapts a function to Exporter.
type Installer ¶
type Installer interface {
Install(ctx runaprovider.Context) error
}
Installer installs trace propagation or instrumentation hooks.
type InstallerFunc ¶
type InstallerFunc func(ctx runaprovider.Context) error
InstallerFunc adapts a function to Installer.
func (InstallerFunc) Install ¶
func (fn InstallerFunc) Install(ctx runaprovider.Context) error
Install installs trace hooks.
type Option ¶
type Option func(*state)
Option configures the observe provider.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry stores named checkers.
type Report ¶
type Report struct {
Status Status `json:"status"`
Duration string `json:"duration"`
CheckedAt string `json:"checked_at"`
Results []Result `json:"results"`
}
Report describes aggregated checker results.
type Result ¶
type Result struct {
Name string `json:"name"`
Status Status `json:"status"`
Message string `json:"message,omitempty"`
Meta core.Map `json:"meta,omitempty"`
Error string `json:"error,omitempty"`
Duration time.Duration `json:"duration,omitempty"`
CheckedAt time.Time `json:"checked_at"`
}
Result describes one checker result.