tsnet

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TSAgent

type TSAgent struct {
	*tsnet.Server
	Lc *local.Client
	ID string
}

Wrapper type so we can add methods to the server.

func NewAgent

func NewAgent(cfg *config.Config) *TSAgent

Creates a new tsnet agent and returns an instance of the server.

func (*TSAgent) Connect

func (s *TSAgent) Connect()

Starts the tsnet agent and sets the node ID.

func (*TSAgent) FetchAllHostInfo added in v0.7.0

func (s *TSAgent) FetchAllHostInfo(ctx context.Context) (map[string]json.RawMessage, error)

FetchAllHostInfo fetches hostinfo for all peers and returns them as a map keyed by node public key (e.g., "nodekey:abc123...").

func (*TSAgent) GetStatusForPeer

func (s *TSAgent) GetStatusForPeer(id string) (*tailcfg.HostinfoView, error)

Returns the raw hostinfo for a peer based on node ID.

func (*TSAgent) Shutdown

func (s *TSAgent) Shutdown()

Shuts down the tsnet agent.

Jump to

Keyboard shortcuts

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