tailscale-client-go

module
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT

README

tailscale-client-go

Go Reference Go Report Card Github Actions

A client implementation for the Tailscale HTTP API. For more details, please see API documentation.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/tailscale/tailscale-client-go/tailscale"
)

func main() {
	apiKey := os.Getenv("TAILSCALE_API_KEY")
	tailnet := os.Getenv("TAILSCALE_TAILNET")

	client, err := tailscale.NewClient(apiKey, tailnet)
	if err != nil {
		log.Fatalln(err)
	}

	// List all your devices
	devices, err := client.Devices(context.Background())
}

Directories

Path Synopsis
Package tailscale contains a basic implementation of a client for the Tailscale HTTP api.
Package tailscale contains a basic implementation of a client for the Tailscale HTTP api.

Jump to

Keyboard shortcuts

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