Documentation ¶
Overview ¶
Package plugin provides several helpers to build a docker log driver
Index ¶
- type HTTPHandler
- func (h *HTTPHandler) Capabilities(w http.ResponseWriter, r *http.Request)
- func (h *HTTPHandler) Initialize(sh *sdk.Handler)
- func (h *HTTPHandler) ReadLogs(w http.ResponseWriter, r *http.Request)
- func (h *HTTPHandler) StartLogging(w http.ResponseWriter, r *http.Request)
- func (h *HTTPHandler) StopLogging(w http.ResponseWriter, r *http.Request)
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPHandler ¶
type HTTPHandler struct {
Plugin Plugin
}
HTTPHandler is a helper struct that implements all the http handlers required for a logging driver
func (*HTTPHandler) Capabilities ¶
func (h *HTTPHandler) Capabilities(w http.ResponseWriter, r *http.Request)
Capabilities is an http handler for the /LogDriver.Capabilities endpoint
func (*HTTPHandler) Initialize ¶
func (h *HTTPHandler) Initialize(sh *sdk.Handler)
Initialize assign the handlers to the given sdk handler
func (*HTTPHandler) ReadLogs ¶
func (h *HTTPHandler) ReadLogs(w http.ResponseWriter, r *http.Request)
ReadLogs is an http handler for the /LogDriver.ReadLogs endpoint
func (*HTTPHandler) StartLogging ¶
func (h *HTTPHandler) StartLogging(w http.ResponseWriter, r *http.Request)
StartLogging is an http handler for the /LogDriver.StartLogging endpoint
func (*HTTPHandler) StopLogging ¶
func (h *HTTPHandler) StopLogging(w http.ResponseWriter, r *http.Request)
StopLogging is an http handler for the /LogDriver.StopLogging endpoint
type Plugin ¶
type Plugin interface { StartLogging(file string, info logger.Info) error StopLogging(file string) error Capabilities() logger.Capability ReadLogs(info logger.Info, config logger.ReadConfig) (io.ReadCloser, error) }
Plugin represents the minimal functionality that must be implemented by a logging plugin
Click to show internal directories.
Click to hide internal directories.