wire

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 2 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go envelope wire presentation

One generic duplex Wire with byte paths, opaque ground ontos values and explicit admission/receive/termination laws. No RPC profile or legacy aliases. Runtime implementations belong to bitruntime. See the repository contract and current carrier format. Version 0.4.0 is a deliberate breaking replacement; compilation, package installation and endpoint conformance are separately reported.

Documentation

Overview

Package wire declares the generic envelope wire. Implementations live in bitruntime.

Index

Constants

View Source
const DefaultMaxEnvelopeBytes = 16 * 1024 * 1024
View Source
const MaxEnvelopeDepth = 4096
View Source
const WebSocketProtocol = "bitwire.ontos.v1"

Variables

This section is empty.

Functions

func EncodeEnvelope added in v0.4.0

func EncodeEnvelope(e Envelope, maxBytes int) ([]byte, error)

func PathEqual added in v0.4.0

func PathEqual(a, b Path) bool

func PathStartsWith added in v0.4.0

func PathStartsWith(a, prefix Path) bool

Types

type Child added in v0.3.0

type Child[T any] struct {
	Key  core.Atom
	Node DeixisNode[T]
}

type DeixisNode added in v0.3.0

type DeixisNode[T any] interface {
	Own() T
	Children() []Child[T]
	At(Path) (DeixisNode[T], bool)
	Decompose() Parts[T]
}

type Envelope added in v0.4.0

type Envelope struct {
	Source      Path
	Destination Path
	ID          core.Atom
	Correlation *core.Atom
	Payload     core.Value
}

func CaptureEnvelope added in v0.4.0

func CaptureEnvelope(e Envelope) (Envelope, error)

func DecodeEnvelope added in v0.4.0

func DecodeEnvelope(bytes []byte, maxBytes int) (Envelope, error)

type Parts added in v0.4.0

type Parts[T any] struct {
	Own      T
	Children []Child[T]
}

type Path added in v0.4.0

type Path []core.Atom

type Termination added in v0.4.0

type Termination struct {
	Kind    string
	Message string
}

type Wire

type Wire interface {
	Send(Envelope) error
	Receive(func(Envelope)) (func(), error)
	Closed() <-chan struct{}
	Termination() Termination
	Close() error
}

Closed broadcasts resource release. Termination is stable after Closed closes. Send returns local admission only. Receive has one detachable owner.

Jump to

Keyboard shortcuts

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