Documentation ¶
Overview ¶
Package http provides the bootcfg HTTP server
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(h ContextHandler) http.Handler
NewHandler returns an http.Handler which wraps the given ContextHandler and creates a background context.Context.
Types ¶
type CloudConfig ¶
type CloudConfig struct {
Content string
}
CloudConfig defines a cloud-init config.
type Config ¶
type Config struct { // Store for configs Store storage.Store // Path to static assets AssetsPath string // config signers (.sig and .asc) Signer sign.Signer ArmoredSigner sign.Signer }
Config configures the api Server.
type ContextHandler ¶
ContextHandler defines a handler which receives a passed context.Context with the standard ResponseWriter and Request.
type ContextHandlerFunc ¶
ContextHandlerFunc type is an adapter to allow the use of an ordinary function as a ContextHandler. If f is a function with the correct signature, ContextHandlerFunc(f) is a ContextHandler that calls f.
func (ContextHandlerFunc) ServeHTTP ¶
func (f ContextHandlerFunc) ServeHTTP(ctx context.Context, w http.ResponseWriter, req *http.Request)
ServeHTTP calls the function f(ctx, w, req).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves boot and provisioning configs to machines via HTTP.
func (*Server) HTTPHandler ¶
HTTPHandler returns a HTTP handler for the server.