Documentation
¶
Index ¶
- type AuthType
- type Option
- type TLSConfig
- type Tailnet
- func (tn *Tailnet) Connect(ctx context.Context, opts ...Option) error
- func (tn *Tailnet) ConnectCmd(ctx context.Context, opts ...Option) error
- func (tn *Tailnet) DialContext(ctx context.Context, addr string, certs *TLSConfig) (*grpc.ClientConn, error)
- func (tn *Tailnet) GetDevices(ctx context.Context) ([]tailscale.Device, error)
- func (tn *Tailnet) WithAuthKey(key string) Option
- func (tn *Tailnet) WithConfigDir(dir string) Option
- func (tn *Tailnet) WithHostname(hostname string) Option
- func (tn *Tailnet) WithOauth(clientId, clientSecret string) Option
- func (tn *Tailnet) WithPort(port string) Option
- func (tn *Tailnet) WithScopes(scopes ...string) Option
- func (tn *Tailnet) WithTags(tags ...string) Option
- func (tn *Tailnet) WithTailnetLogging(enabled bool) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tailnet ¶
type Tailnet struct { ConfigDir string ClientID string ClientSecret string AuthKey string Hostname string Addr string Port string TLSConfig *TLSConfig Scopes []string Tags []string Client *tailscale.Client TSServer *tsnet.Server GRPCServer *grpc.Server Listener net.Listener TailnetLogging bool // contains filtered or unexported fields }
Tailnet main struct to hold connection to the tailnet information
func (*Tailnet) ConnectCmd ¶
ConnectCmd setup the tailnet connection without starting the gRPC server
func (*Tailnet) DialContext ¶
func (*Tailnet) GetDevices ¶
GetDevices returns a list of devices that are connected to the configured tailnet
func (*Tailnet) WithAuthKey ¶
WithAPIKey sets the Option to connect to the tailnet with a preconfigured Auth key
func (*Tailnet) WithConfigDir ¶
func (*Tailnet) WithHostname ¶
WithHostname Override the hostname on the tailnet
func (*Tailnet) WithScopes ¶
WithScopes sets the Oauth scopes to configure for the connection
func (*Tailnet) WithTailnetLogging ¶
WithTailnetLogging Enable/Disable logging on the tailnet
Click to show internal directories.
Click to hide internal directories.