socket

package
v0.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2018 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProxy

type AuthProxy struct {
	// contains filtered or unexported fields
}

AuthProxy exposes an HTTP interface over a domain socket. It handles adding auth headers to requests on the `/proxy` endpoint to directly proxy requests from the cli to the registry, and exposes an interface over `/v1` for secure and composite operations.

func NewAuthProxy

func NewAuthProxy(c *config.Config, sess session.Session, db *db.DB, t *http.Transport,
	client *registry.Client, logic *logic.Engine, updates *updates.Engine, groupShared bool) (*AuthProxy, error)

NewAuthProxy returns a new AuthProxy. It will return an error if creation of the domain socket fails, or the upstream registry URL is misconfigured.

If groupShared is true, the domain socket will be readable and writable by both the user and the user's group (so daemon can be accessed by multiple users). If false, the socket will only be readable and writable by the user running the daemon.

func (*AuthProxy) Addr

func (p *AuthProxy) Addr() string

Addr returns the domain socket this proxy is listening on.

func (*AuthProxy) Close

func (p *AuthProxy) Close() error

Close gracefully closes the socket, ensuring all requests are finished within the timeout.

func (*AuthProxy) Listen

func (p *AuthProxy) Listen() error

Listen starts the main loop of the AuthProxy. It returns on error, or when the AuthProxy is closed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL