Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultContentTypeV1_1 = "application/vnd.docker.plugins.v1.1+json"
DefaultContentTypeV1_1 is the default content type accepted and sent by the plugins.
Variables ¶
This section is empty.
Functions ¶
func DecodeRequest ¶
func DecodeRequest(w http.ResponseWriter, r *http.Request, req interface{}) (err error)
DecodeRequest decodes an http request into a given structure.
func EncodeResponse ¶
func EncodeResponse(w http.ResponseWriter, res interface{}, err string)
EncodeResponse encodes the given structure into an http response.
func StreamResponse ¶
func StreamResponse(w http.ResponseWriter, data io.ReadCloser)
StreamResponse streams a response object to the client
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the base to create plugin handlers. It initializes connections and sockets to listen to.
func NewHandler ¶
NewHandler creates a new Handler with an http mux.
func (Handler) HandleFunc ¶
HandleFunc registers a function to handle a request path with.
Click to show internal directories.
Click to hide internal directories.