protocol

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

README

Master protocol package

This public package exposes the same versioned wire types, strict decoders, configuration validation, account labels and schemas used by the agent. Masters can import it without depending on private implementation packages. types.go provides contract aliases; codec.go provides validation and codec entry points. Domain state, networking and runtime lifecycles remain outside this package. Pin an agent revision and negotiate optional capabilities before transmitting new fields.

Documentation

Overview

Package protocol exposes the versioned master/agent contract to master implementations.

Index

Constants

View Source
const MaxFrameBytes = wire.MaxFrameBytes
View Source
const Version = wire.Version

Variables

This section is empty.

Functions

func Clone

func Clone[T any](value T) T

func CommandNames

func CommandNames() []string

func Decode

func Decode(raw []byte, target any) error

func PublicProxyAddress

func PublicProxyAddress(address string) bool

func Schemas

func Schemas() map[string]any

func UserEmail

func UserEmail(user User, tag string) string

func ValidName

func ValidName(value string) bool

func ValidateMemberOutbounds

func ValidateMemberOutbounds(raw json.RawMessage, tags []string) error

func ValidateUsers

func ValidateUsers(users []User) error

Types

type AgentHello

type AgentHello = wire.AgentHello

type CertConfig

type CertConfig = config.CertConfig

type Certificate

type Certificate = wire.Certificate

type Config

type Config = wire.Config

func ParseConfig

func ParseConfig(raw []byte) (Config, error)

type DDNSJob

type DDNSJob = wire.DDNSJob

type DNSPolicy

type DNSPolicy = wire.DNSPolicy

type FirewallPolicy

type FirewallPolicy = wire.FirewallPolicy

type Forward

type Forward = wire.Forward

type IPBlock

type IPBlock = wire.IPBlock

type IPControl

type IPControl = wire.IPControl

type Message

type Message = wire.Message

func New

func New(kind, id string, revision uint64, data any) Message

func Parse

func Parse(raw []byte) (Message, error)

type PortRange

type PortRange = wire.PortRange

type Provider

type Provider = wire.Provider

type TelemetryPolicy

type TelemetryPolicy = wire.TelemetryPolicy

type TelemetryReport

type TelemetryReport = wire.TelemetryReport

type TorrentPolicy

type TorrentPolicy = wire.TorrentPolicy

type Traffic

type Traffic = wire.Traffic

type TrafficBarrier

type TrafficBarrier = wire.TrafficBarrier

type TrafficFlush

type TrafficFlush = wire.TrafficFlush

type TrafficReport

type TrafficReport = wire.TrafficReport

type TrafficSample

type TrafficSample = wire.TrafficSample

type UpdatePolicy

type UpdatePolicy = wire.UpdatePolicy

type User

type User = wire.User

type UserControl

type UserControl = wire.UserControl

type UserControls

type UserControls = wire.UserControls

type UserLimitStatus

type UserLimitStatus = wire.UserLimitStatus

type UserMetrics

type UserMetrics = wire.UserMetrics

type UserRate

type UserRate = wire.UserRate

type UserSpeedStatus

type UserSpeedStatus = wire.UserSpeedStatus

type UsersDelta

type UsersDelta = wire.UsersDelta

type UsersSync

type UsersSync = wire.UsersSync

Jump to

Keyboard shortcuts

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