Documentation
¶
Index ¶
- func AcceptConnections(job *engine.Job) engine.Status
- func AttachProfiler(router *mux.Router)
- func NewCertAuthTLSConfig(caPath, certPath, keyPath string) (*tls.Config, error)
- func NewIdentityAuthTLSConfig(trustKey libtrust.PrivateKey, clients *ClientKeyManager, addr string) (*tls.Config, error)
- func ServeApi(job *engine.Job) engine.Status
- func ServeRequest(eng *engine.Engine, apiversion version.Version, w http.ResponseWriter, ...) error
- type ClientKeyManager
- type HttpApiFunc
- type HttpServer
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachProfiler ¶
func NewCertAuthTLSConfig ¶
NewCertAuthTLSConfig creates a tls.Config for the server to use for certificate authentication
func NewIdentityAuthTLSConfig ¶
func NewIdentityAuthTLSConfig(trustKey libtrust.PrivateKey, clients *ClientKeyManager, addr string) (*tls.Config, error)
NewIdentityAuthTLSConfig creates a tls.Config for the server to use for libtrust identity authentication
func ServeApi ¶
ServeApi loops through all of the protocols sent in to docker and spawns off a go routine to setup a serving http.Server for each.
func ServeRequest ¶
func ServeRequest(eng *engine.Engine, apiversion version.Version, w http.ResponseWriter, req *http.Request) error
ServeRequest processes a single http request to the docker remote api. FIXME: refactor this to be part of Server and not require re-creating a new router each time. This requires first moving ListenAndServe into Server.
Types ¶
type ClientKeyManager ¶
type ClientKeyManager struct {
// contains filtered or unexported fields
}
ClientKeyManager manages client keys on the filesystem
func NewClientKeyManager ¶
func NewClientKeyManager(trustKey libtrust.PrivateKey, clientFile, clientDir string) (*ClientKeyManager, error)
NewClientKeyManager loads a new manager from a set of key files and managed by the given private key.
func (*ClientKeyManager) RegisterTLSConfig ¶
func (c *ClientKeyManager) RegisterTLSConfig(tlsConfig *tls.Config) error
RegisterTLSConfig registers a tls configuration to manager such that any changes to the keys may be reflected in the tls client CA pool
type HttpApiFunc ¶
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func (*HttpServer) Close ¶
func (s *HttpServer) Close() error
func (*HttpServer) Serve ¶
func (s *HttpServer) Serve() error