tailscale-client-go

module
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: MIT

README

tailscale-client-go

Go Reference Go Report Card Github Actions

A client implementation for the Tailscale HTTP API

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/davidsbond/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