Documentation
¶
Overview ¶
Package host provides Runa host primitives.
Index ¶
- type Checker
- type Drainer
- type HTTPConfig
- type HTTPServer
- func (server *HTTPServer) Addr() string
- func (server *HTTPServer) Check(context.Context) Health
- func (server *HTTPServer) Drain(context.Context) error
- func (server *HTTPServer) Error() error
- func (server *HTTPServer) Name() string
- func (server *HTTPServer) Start(ctx context.Context) error
- func (server *HTTPServer) Status() Status
- func (server *HTTPServer) Stop(ctx context.Context) error
- type Health
- type Info
- type Manager
- type Status
- type Unit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPConfig ¶
type HTTPConfig struct {
Name string
Addr string
Handler http.Handler
ReadTimeout time.Duration
WriteTimeout time.Duration
IdleTimeout time.Duration
ShutdownTimeout time.Duration
}
HTTPConfig configures an HTTP host unit.
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer is a net/http based host unit.
func (*HTTPServer) Addr ¶
func (server *HTTPServer) Addr() string
Addr returns the listening address.
func (*HTTPServer) Check ¶
func (server *HTTPServer) Check(context.Context) Health
Check returns HTTP host health.
func (*HTTPServer) Drain ¶
func (server *HTTPServer) Drain(context.Context) error
Drain marks the HTTP server as draining.
func (*HTTPServer) Error ¶
func (server *HTTPServer) Error() error
Error returns the last server error.
func (*HTTPServer) Start ¶
func (server *HTTPServer) Start(ctx context.Context) error
Start starts the HTTP server.
func (*HTTPServer) Status ¶
func (server *HTTPServer) Status() Status
Status returns the current HTTP host status.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager registers and controls host units.
func (*Manager) Register ¶
Register adds or replaces host units. Re-registering the same name keeps its original order.
func (*Manager) Start ¶
Start starts selected host units. When names is empty, all registered units are started.
Click to show internal directories.
Click to hide internal directories.