headscale

package
v0.28.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeadscaleClient

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

func NewHeadscaleClient

func NewHeadscaleClient(addr, controlPlaneAddr, apiKey string, logger *slog.Logger) (client *HeadscaleClient, err error)

func (*HeadscaleClient) Close

func (h *HeadscaleClient) Close() error

Close client

func (*HeadscaleClient) CreatePreAuthKey

func (h *HeadscaleClient) CreatePreAuthKey(ctx context.Context, user string, expiration time.Time, isEphemeral bool) (key string, err error)

func (*HeadscaleClient) CreateUser added in v0.22.3

func (h *HeadscaleClient) CreateUser(ctx context.Context, name string) error

func (*HeadscaleClient) DeleteMachine added in v0.21.3

func (h *HeadscaleClient) DeleteMachine(ctx context.Context, machineID, projectID string) (err error)

DeleteMachine removes the node entry from headscale DB

func (*HeadscaleClient) GetControlPlaneAddress

func (h *HeadscaleClient) GetControlPlaneAddress() string

func (*HeadscaleClient) MachinesConnected added in v0.21.4

func (h *HeadscaleClient) MachinesConnected(ctx context.Context) (connectedMap, error)

func (*HeadscaleClient) UserExists added in v0.22.3

func (h *HeadscaleClient) UserExists(ctx context.Context, name string) bool

Jump to

Keyboard shortcuts

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