server

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPermissionDenied error = errors.New("ipc: permission denied")
	ErrNoDaemon         error = errors.New("ipc: no daemon")
)

Functions

This section is empty.

Types

type ApiClient

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

func (*ApiClient) QueryPeers

func (c *ApiClient) QueryPeers() ([]PeerState, error)

type PeerState

type PeerState struct {
	ID             disco.PeerID `json:"id"`
	Hostname       string       `json:"hostname"`
	IPv4           string       `json:"ipv4"`
	IPv6           string       `json:"ipv6"`
	Addrs          []string     `json:"addrs"`
	LastActiveTime time.Time    `json:"last_active_time"`
	Mode           string       `json:"mode"`
	NAT            string       `json:"nat"`
	Version        string       `json:"version"`
	Labels         disco.Labels `json:"labels"`
}

type Server

type Server struct {
	Vnic      *nic.VirtualNIC
	PeerStore udp.PeerStore
	Meta      func(disco.PeerID) url.Values
}

func (*Server) Start

func (s *Server) Start(ctx context.Context, stopWG *sync.WaitGroup) error

Jump to

Keyboard shortcuts

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