Documentation
¶
Overview ¶
Package humus provides a base config and abstraction for running apps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrOTLPMustBeEnabled = errors.New("missing otlp client conn")
Functions ¶
Types ¶
type ErrorHandler ¶ added in v0.5.0
type ErrorHandler interface {
HandleError(error)
}
ErrorHandler allows custom error handling logic to be defined for when the Runner encounters an error while building or running a bedrock.App.
type ErrorHandlerFunc ¶ added in v0.5.0
type ErrorHandlerFunc func(error)
ErrorHandlerFunc is a func type of the ErrorHandler interface.
func (ErrorHandlerFunc) HandleError ¶ added in v0.5.0
func (f ErrorHandlerFunc) HandleError(err error)
HandleError implements the ErrorHandler inteface.
type Runner ¶ added in v0.5.0
type Runner[T any] struct { // contains filtered or unexported fields }
Runner orchestrates the building of a bedrock.App and running it.
func NewRunner ¶ added in v0.5.0
func NewRunner[T any](builder bedrock.AppBuilder[T], opts ...RunnerOption) Runner[T]
NewRunner initializes a Runner.
type RunnerOption ¶ added in v0.5.0
type RunnerOption interface {
ApplyRunnerOption(*RunnerOptions)
}
RunnerOption sets a value on RunnerOptions.
func OnError ¶ added in v0.5.0
func OnError(eh ErrorHandler) RunnerOption
OnError registers the given ErrorHandler with the Runner.
type RunnerOptions ¶ added in v0.5.0
type RunnerOptions struct {
// contains filtered or unexported fields
}
RunnerOptions are configurable parameters of a Runner.
Directories
¶
Path | Synopsis |
---|---|
example
|
|
Package health provides utilities for monitoring the healthiness of an application.
|
Package health provides utilities for monitoring the healthiness of an application. |
Package humuspb defines reusable protobuf types for use in APIs.
|
Package humuspb defines reusable protobuf types for use in APIs. |
Package rest supports creating RESTful applications.
|
Package rest supports creating RESTful applications. |
rpc
Package rpc helps users implement [http.Handler]s using a RPC style interface.
|
Package rpc helps users implement [http.Handler]s using a RPC style interface. |
Click to show internal directories.
Click to hide internal directories.