protocol

package
v0.1.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Overview

Package protocol holds the version of the agent-hub contract defined in proto/regulus/agent/v1. The generated code lives in internal/gen.

Index

Constants

View Source
const MinSupported uint32 = 1

MinSupported is the oldest protocol version this build still accepts.

View Source
const Version uint32 = 1

Version is the protocol version spoken by this build. It is sent in Hello and Welcome. Bump it only for changes that an older peer cannot understand; adding fields or messages is compatible and does not need a new version.

Variables

This section is empty.

Functions

func Negotiate

func Negotiate(min, max uint32) (version uint32, ok bool)

Negotiate picks the protocol version for a connection from the range the agent speaks. min 0 means an agent that predates the field and speaks only max. ok is false when the ranges do not meet.

func Supported

func Supported(v uint32) bool

Supported reports whether a peer speaking version v can be served.

Types

This section is empty.

Jump to

Keyboard shortcuts

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