source

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPNBusWatcher

type IPNBusWatcher interface {
	Next() (ipn.Notify, error)
	Close() error
}

type IPNBusWatcherFactory

type IPNBusWatcherFactory func(ctx context.Context, client *local.Client, mask ipn.NotifyWatchOpt) (IPNBusWatcher, error)

type LocalClientFactory

type LocalClientFactory func(server *tsnet.Server) (*local.Client, error)

type Netmap

type Netmap struct {
	PolledAt     time.Time `json:"polled_at"`
	Peers        []Peer    `json:"peers"`
	DaemonState  string    `json:"daemon_state,omitempty"`
	Prefs        Prefs     `json:"prefs,omitempty"`
	Tailnet      Tailnet   `json:"tailnet,omitempty"`
	ErrorMessage string    `json:"error_message,omitempty"`
}

func DefaultTSNetFetch

func DefaultTSNetFetch(ctx context.Context, server *tsnet.Server) (Netmap, error)

DefaultTSNetFetch converts tsnet local status JSON into Sentinel's netmap shape.

type NetmapSource

type NetmapSource interface {
	Poll(ctx context.Context) (Netmap, error)
}

type Peer

type Peer struct {
	ID                string            `json:"id"`
	Name              string            `json:"name"`
	Online            bool              `json:"online"`
	Tags              []string          `json:"tags,omitempty"`
	Owners            []string          `json:"owners,omitempty"`
	IPs               []string          `json:"ips,omitempty"`
	Routes            []string          `json:"routes,omitempty"`
	MachineAuthorized bool              `json:"machine_authorized,omitempty"`
	Expired           bool              `json:"expired,omitempty"`
	KeyExpiry         string            `json:"key_expiry,omitempty"`
	HostinfoHash      string            `json:"hostinfo_hash,omitempty"`
	Metadata          map[string]string `json:"metadata,omitempty"`
}

type Prefs

type Prefs struct {
	AdvertiseRoutes []string `json:"advertise_routes,omitempty"`
	ExitNodeID      string   `json:"exit_node_id,omitempty"`
	RunSSH          bool     `json:"run_ssh,omitempty"`
	ShieldsUp       bool     `json:"shields_up,omitempty"`
}

type RealtimeConfig

type RealtimeConfig struct {
	WatchMask      ipn.NotifyWatchOpt
	ReconnectMin   time.Duration
	ReconnectMax   time.Duration
	Logger         *zap.Logger
	NewWatcher     IPNBusWatcherFactory
	NewLocalClient LocalClientFactory
}

type SequenceSource

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

func NewSequenceSource

func NewSequenceSource(netmaps []Netmap) *SequenceSource

func (*SequenceSource) Poll

type StaticSource

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

func NewStaticSource

func NewStaticSource(netmap Netmap) *StaticSource

func (*StaticSource) Poll

func (s *StaticSource) Poll(context.Context) (Netmap, error)

type TSNetFetchFunc

type TSNetFetchFunc func(ctx context.Context, server *tsnet.Server) (Netmap, error)

type TSNetRealtimeSource

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

func NewTSNetRealtimeSource

func NewTSNetRealtimeSource(server *tsnet.Server, cfg RealtimeConfig) *TSNetRealtimeSource

func (*TSNetRealtimeSource) Poll

type TSNetSource

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

func NewTSNetSource

func NewTSNetSource(server *tsnet.Server, fetch TSNetFetchFunc) *TSNetSource

func (*TSNetSource) Poll

func (s *TSNetSource) Poll(ctx context.Context) (Netmap, error)

type Tailnet

type Tailnet struct {
	Domain     string `json:"domain,omitempty"`
	TKAEnabled bool   `json:"tka_enabled,omitempty"`
}

Jump to

Keyboard shortcuts

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