Documentation ¶
Index ¶
- type HeadscaleClient
- func (h *HeadscaleClient) Close() error
- func (h *HeadscaleClient) CreatePreAuthKey(ctx context.Context, user string, expiration time.Time, isEphemeral bool) (key string, err error)
- func (h *HeadscaleClient) CreateUser(ctx context.Context, name string) error
- func (h *HeadscaleClient) DeleteMachine(ctx context.Context, machineID, projectID string) (err error)
- func (h *HeadscaleClient) GetControlPlaneAddress() string
- func (h *HeadscaleClient) MachinesConnected(ctx context.Context) (connectedMap, error)
- func (h *HeadscaleClient) UserExists(ctx context.Context, name string) bool
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) CreatePreAuthKey ¶
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
Click to show internal directories.
Click to hide internal directories.