Documentation
¶
Index ¶
- Constants
- type DERPServerInContainer
- func (t *DERPServerInContainer) ConnectToNetwork(network *dockertest.Network) error
- func (t *DERPServerInContainer) GetCert() []byte
- func (t *DERPServerInContainer) GetDERPPort() int
- func (t *DERPServerInContainer) GetHostname() string
- func (t *DERPServerInContainer) GetSTUNPort() int
- func (t *DERPServerInContainer) Hostname() string
- func (t *DERPServerInContainer) ID() string
- func (t *DERPServerInContainer) SaveLog(path string) error
- func (t *DERPServerInContainer) Shutdown() error
- func (t *DERPServerInContainer) Version() string
- func (t *DERPServerInContainer) WaitForRunning() error
- func (t *DERPServerInContainer) WriteFile(path string, data []byte) error
- type Option
Constants ¶
const (
DERPerCertRoot = "/usr/local/share/derper-certs"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DERPServerInContainer ¶
type DERPServerInContainer struct {
// contains filtered or unexported fields
}
DERPServerInContainer represents DERP Server in Container (DSIC).
func New ¶
func New( pool *dockertest.Pool, version string, networks []*dockertest.Network, opts ...Option, ) (*DERPServerInContainer, error)
New returns a new TailscaleInContainer instance.
func (*DERPServerInContainer) ConnectToNetwork ¶
func (t *DERPServerInContainer) ConnectToNetwork(network *dockertest.Network) error
ConnectToNetwork connects the DERPer instance to a network.
func (*DERPServerInContainer) GetCert ¶
func (t *DERPServerInContainer) GetCert() []byte
GetCert returns the TLS certificate of the DERPer instance.
func (*DERPServerInContainer) GetDERPPort ¶
func (t *DERPServerInContainer) GetDERPPort() int
GetDERPPort returns the DERP port of the DERPer instance.
func (*DERPServerInContainer) GetHostname ¶
func (t *DERPServerInContainer) GetHostname() string
func (*DERPServerInContainer) GetSTUNPort ¶
func (t *DERPServerInContainer) GetSTUNPort() int
GetSTUNPort returns the STUN port of the DERPer instance.
func (*DERPServerInContainer) Hostname ¶
func (t *DERPServerInContainer) Hostname() string
Hostname returns the hostname of the DERPer instance.
func (*DERPServerInContainer) ID ¶
func (t *DERPServerInContainer) ID() string
ID returns the Docker container ID of the DERPServerInContainer instance.
func (*DERPServerInContainer) SaveLog ¶
func (t *DERPServerInContainer) SaveLog(path string) error
SaveLog saves the current stdout log of the container to a path on the host system.
func (*DERPServerInContainer) Shutdown ¶
func (t *DERPServerInContainer) Shutdown() error
Shutdown stops and cleans up the DERPer container.
func (*DERPServerInContainer) Version ¶
func (t *DERPServerInContainer) Version() string
Version returns the running DERPer version of the instance.
func (*DERPServerInContainer) WaitForRunning ¶
func (t *DERPServerInContainer) WaitForRunning() error
WaitForRunning blocks until the DERPer instance is ready to be used.
type Option ¶
type Option = func(c *DERPServerInContainer)
Option represent optional settings that can be given to a DERPer instance.
func WithCACert ¶
WithCACert adds it to the trusted surtificate of the Tailscale container.
func WithDockerWorkdir ¶
WithDockerWorkdir allows the docker working directory to be set.
func WithExtraHosts ¶
WithExtraHosts adds extra hosts to the container.
func WithOrCreateNetwork ¶
func WithOrCreateNetwork(network *dockertest.Network) Option
WithOrCreateNetwork sets the Docker container network to use with the DERPer instance, if the parameter is nil, a new network, isolating the DERPer, will be created. If a network is passed, the DERPer instance will join the given network.
func WithVerifyClientURL ¶
WithVerifyClientURL sets the URL to verify the client.