Help us shape the future of Go! Take the 2026 Go Developer Survey

node

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHost

func DefaultHost() string

Types

type Config

type Config struct {
	Name     string
	Host     string
	Version  string
	Mode     string
	Policy   *policy.Policy
	Exit     bool
	Prefixes []string
	Logf     func(format string, args ...any)
	Status   func(format string, args ...any)
}

type Node

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

func New

func New(cfg Config) *Node

func (*Node) API

func (n *Node) API() *webrtc.API

func (*Node) Caps

func (n *Node) Caps() []string

func (*Node) Dialer

func (n *Node) Dialer() *policy.Dialer

func (*Node) Handle

func (n *Node) Handle(capability, kind string, h link.Handler)

func (*Node) Hello

func (n *Node) Hello() link.Hello

func (*Node) Logf

func (n *Node) Logf(format string, args ...any)

func (*Node) OnHello added in v1.11.0

func (n *Node) OnHello(f func(*link.Hello))

func (*Node) Options

func (n *Node) Options() link.Options

func (*Node) Policy

func (n *Node) Policy() *policy.Policy

func (*Node) Serve

func (n *Node) Serve(ctx context.Context, conn signal.Conn) error

func (*Node) SetSSHHostKey

func (n *Node) SetSSHHostKey(key string)

Jump to

Keyboard shortcuts

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