Documentation
¶
Index ¶
- func ConnectToHost(ctx context.Context, host string, timeout time.Duration, tailscale *Tailscale, ...) (net.Conn, error)
- func GetDialer(host string, tailscale *Tailscale, tsConfig types.TailscaleConfig) func(ctx context.Context, network, address string) (net.Conn, error)
- func ResolveTailscaleService(serviceName string, timeout time.Duration) (string, error)
- type Tailscale
- func (t *Tailscale) Close() error
- func (t *Tailscale) Dial(ctx context.Context, network, addr string) (net.Conn, error)
- func (t *Tailscale) DialTimeout(network, addr string, timeout time.Duration) (net.Conn, error)
- func (t *Tailscale) GetHostnameForService(serviceName string) (string, error)
- func (t *Tailscale) GetServer() *tsnet.Server
- func (t *Tailscale) ResolveService(serviceName string, timeout time.Duration) (string, error)
- func (t *Tailscale) Serve(ctx context.Context, service types.InternalService) (net.Listener, error)
- type TailscaleConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectToHost ¶
Types ¶
type Tailscale ¶
type Tailscale struct {
// contains filtered or unexported fields
}
func GetOrCreateTailscale ¶
func GetOrCreateTailscale(cfg TailscaleConfig, tailscaleRepo repository.TailscaleRepository) *Tailscale
GetOrCreateTailscale checks the registry for an existing server by name. If it exists, it returns that; otherwise, it creates and registers a new one.
func (*Tailscale) DialTimeout ¶
DialTimeout attempts to establish a TCP connection to a tailscale service with the specified timeout duration
func (*Tailscale) GetHostnameForService ¶
GetHostnameForService retrieves a random, available hostname for a particular service These are served from the "proxy" service, which binds tsnet services to local ports
func (*Tailscale) ResolveService ¶
Click to show internal directories.
Click to hide internal directories.