tor

package
v0.0.0-...-d368871 Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TorChain is the TOR iptable chain name.
	TorChain = "TOR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	network.Driver

	sync.Mutex
	// contains filtered or unexported fields
}

Driver represents the interface for the network plugin driver.

func NewDriver

func NewDriver() (*Driver, error)

NewDriver creates a new Driver pointer.

func (*Driver) CreateEndpoint

CreateEndpoint creates new endpoints for a container.

func (*Driver) CreateNetwork

func (d *Driver) CreateNetwork(r *network.CreateNetworkRequest) error

CreateNetwork creates a new tor network.

func (*Driver) DeleteEndpoint

func (d *Driver) DeleteEndpoint(r *network.DeleteEndpointRequest) error

DeleteEndpoint deletes the given endpoints.

func (*Driver) DeleteNetwork

func (d *Driver) DeleteNetwork(r *network.DeleteNetworkRequest) error

DeleteNetwork deletes a given tor network.

func (*Driver) EndpointInfo

func (d *Driver) EndpointInfo(r *network.InfoRequest) (*network.InfoResponse, error)

EndpointInfo returns information about an endpoint.

func (*Driver) GetCapabilities

func (d *Driver) GetCapabilities() (*network.CapabilitiesResponse, error)

GetCapabilities gets the scope for the network.

func (*Driver) Join

Join creates a veth pair connected to the requested network.

func (*Driver) Leave

func (d *Driver) Leave(r *network.LeaveRequest) error

Leave deletes and cleans up a veth pair in the given network.

type EndpointNotFoundError

type EndpointNotFoundError string

EndpointNotFoundError is returned when the no endpoint with the passed endpoint id is found.

func (EndpointNotFoundError) Error

func (enfe EndpointNotFoundError) Error() string

func (EndpointNotFoundError) NotFound

func (enfe EndpointNotFoundError) NotFound()

NotFound denotes the type of this error

type ErrInvalidEndpointConfig

type ErrInvalidEndpointConfig struct{}

ErrInvalidEndpointConfig error is returned when a endpoint create is attempted with an invalid endpoint configuration.

func (*ErrInvalidEndpointConfig) BadRequest

func (eiec *ErrInvalidEndpointConfig) BadRequest()

BadRequest denotes the type of this error

func (*ErrInvalidEndpointConfig) Error

func (eiec *ErrInvalidEndpointConfig) Error() string

type ErrUnsupportedAddressType

type ErrUnsupportedAddressType string

ErrUnsupportedAddressType is returned when the specified address type is not supported.

func (ErrUnsupportedAddressType) BadRequest

func (uat ErrUnsupportedAddressType) BadRequest()

BadRequest denotes the type of this error

func (ErrUnsupportedAddressType) Error

func (uat ErrUnsupportedAddressType) Error() string

type InvalidEndpointIDError

type InvalidEndpointIDError string

InvalidEndpointIDError is returned when the passed endpoint id is not valid.

func (InvalidEndpointIDError) BadRequest

func (ieie InvalidEndpointIDError) BadRequest()

BadRequest denotes the type of this error

func (InvalidEndpointIDError) Error

func (ieie InvalidEndpointIDError) Error() string

type NetworkState

type NetworkState struct {
	BridgeName  string
	MTU         int
	Gateway     string
	GatewayMask string

	sync.Mutex
	// contains filtered or unexported fields
}

NetworkState is filled in at network creation time. It contains state that we wish to keep for each network.

Jump to

Keyboard shortcuts

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