Documentation
¶
Index ¶
- Variables
- func NewServer(ctx context.Context, cfg config.Containable, handler http.Handler) (*http.Server, error)
- func Register(ctx context.Context, id string, controller controls.Controllable, ...) error
- func Start(cfg config.Containable, logger *slog.Logger, srv *http.Server) controls.StartFunc
- func Status()
- func Stop(logger *slog.Logger, srv *http.Server) controls.StopFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnableToParseSpec = errors.New("unable to parse spec content")
)
Functions ¶
func NewServer ¶
func NewServer(ctx context.Context, cfg config.Containable, handler http.Handler) (*http.Server, error)
NewServer returns a new preconfigured http.Server.
func Register ¶ added in v1.0.7
func Register(ctx context.Context, id string, controller controls.Controllable, cfg config.Containable, logger *slog.Logger, handler http.Handler) error
Register creates a new HTTP server and registers it with the controller under the given id.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.