wire

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 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 wire presentation

Addressless Wire sends a ground ontos value. Endpoint adds receive ownership and closure. AddressedWire adds an exact byte-path argument; AddressedEndpoint carries that layer over one endpoint. WireNode is the complete deixis structure over Wire values (a nominal interface in Java), not opaque route access.

See the repository's docs/wire/contract.md and docs/wire/carriers.md. Version 0.5.0 is a clean breaking replacement; compilation and packaged consumers check the native surface, while bitruntime supplies independently tested implementations.

Documentation

Overview

Package wire declares addressless interaction and addressed access.

Index

Constants

View Source
const DefaultMaxMessageBytes = 16 * 1024 * 1024
View Source
const MaxMessageDepth = 4096
View Source
const WebSocketProtocol = "bitwire.ontos.v2"

Variables

This section is empty.

Functions

func DecodeMessage added in v0.5.0

func DecodeMessage(bytes []byte, maxBytes int) (core.Value, error)

func EncodeMessage added in v0.5.0

func EncodeMessage(message core.Value, maxBytes int) ([]byte, error)

func PackAddressed added in v0.5.0

func PackAddressed(path Path, message core.Value) (core.Value, 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 AddressedEndpoint added in v0.5.0

type AddressedEndpoint interface {
	AddressedWire
	Receive(func(Path, core.Value)) (func(), error)
	Closed() <-chan struct{}
	Termination() Termination
	Close() error
}

type AddressedWire added in v0.3.0

type AddressedWire interface {
	Send(Path, core.Value) error
}

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 Endpoint added in v0.2.0

type Endpoint interface {
	Wire
	Receive(func(core.Value)) (func(), error)
	Closed() <-chan struct{}
	Termination() Termination
	Close() 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

func UnpackAddressed added in v0.5.0

func UnpackAddressed(value core.Value) (Path, core.Value, error)

type Termination added in v0.4.0

type Termination struct {
	Kind    string
	Message string
}

type Wire

type Wire interface {
	Send(core.Value) error
}

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

type WireNode added in v0.5.0

type WireNode = DeixisNode[Wire]

Jump to

Keyboard shortcuts

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