Documentation
¶
Overview ¶
Package wire declares addressless interaction and addressed access.
Index ¶
- Constants
- Variables
- func DecodeMessage(bytes []byte, maxBytes int) (core.Value, error)
- func EncodeMessage(message core.Value, maxBytes int) ([]byte, error)
- func HydratedDataToGround(value HydratedData, limits HydratedCodecLimits) (core.Value, error)
- func PackAddressed(path Path, message core.Value) (core.Value, error)
- func PackHydratedBody(value HydratedData, limits HydratedCodecLimits) (core.Value, error)
- func PackHydratedFrame(frame HydratedFrame, limits HydratedCodecLimits) (core.Value, error)
- func PackHydratedReference(value HydratedReference, limits HydratedCodecLimits) (core.Value, error)
- func PathEqual(a, b Path) bool
- func PathStartsWith(a, prefix Path) bool
- type AddressedEndpoint
- type AddressedWire
- type Child
- type DeixisNode
- type Endpoint
- type HydratedCodecLimits
- type HydratedData
- type HydratedDataAtom
- type HydratedDataTuple
- type HydratedEndpoint
- type HydratedFrame
- type HydratedReference
- type HydratedTuple
- type HydratedValue
- type HydratedWire
- type Parts
- type Path
- type ReceivedContext
- type Termination
- type Wire
- type WireNode
Constants ¶
const DefaultMaxMessageBytes = 16 * 1024 * 1024
const MaxMessageDepth = 4096
const WebSocketProtocol = "bitwire.ontos.v2"
Variables ¶
Functions ¶
func DecodeMessage ¶ added in v0.5.0
func EncodeMessage ¶ added in v0.5.0
func HydratedDataToGround ¶ added in v0.6.0
func HydratedDataToGround(value HydratedData, limits HydratedCodecLimits) (core.Value, error)
func PackAddressed ¶ added in v0.5.0
func PackHydratedBody ¶ added in v0.6.0
func PackHydratedBody(value HydratedData, limits HydratedCodecLimits) (core.Value, error)
func PackHydratedFrame ¶ added in v0.6.0
func PackHydratedFrame(frame HydratedFrame, limits HydratedCodecLimits) (core.Value, error)
func PackHydratedReference ¶ added in v0.6.0
func PackHydratedReference(value HydratedReference, limits HydratedCodecLimits) (core.Value, error)
func PathStartsWith ¶ added in v0.4.0
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 DeixisNode ¶ added in v0.3.0
type HydratedCodecLimits ¶ added in v0.6.0
type HydratedCodecLimits struct{ Nodes, Depth, Bytes int }
HydratedCodecLimits bounds semantic nodes, tuple depth (root zero), and both semantic payload bytes and encoded bytes. All three bounds are inclusive and positive.
type HydratedData ¶ added in v0.6.0
type HydratedData interface {
// contains filtered or unexported methods
}
HydratedData is pure structural data, never a live Wire or an export registry.
func HydratedDataFromGround ¶ added in v0.6.0
func HydratedDataFromGround(value core.Value, limits HydratedCodecLimits) (HydratedData, error)
func UnpackHydratedBody ¶ added in v0.6.0
func UnpackHydratedBody(value core.Value, limits HydratedCodecLimits) (HydratedData, error)
type HydratedDataAtom ¶ added in v0.6.0
type HydratedDataAtom struct {
// contains filtered or unexported fields
}
func NewHydratedDataAtom ¶ added in v0.6.0
func NewHydratedDataAtom(value core.Atom) HydratedDataAtom
func (HydratedDataAtom) Value ¶ added in v0.6.0
func (a HydratedDataAtom) Value() core.Atom
type HydratedDataTuple ¶ added in v0.6.0
type HydratedDataTuple struct {
// contains filtered or unexported fields
}
func NewHydratedDataTuple ¶ added in v0.6.0
func NewHydratedDataTuple(items ...HydratedData) (HydratedDataTuple, error)
func (HydratedDataTuple) At ¶ added in v0.6.0
func (t HydratedDataTuple) At(index int) HydratedData
func (HydratedDataTuple) Items ¶ added in v0.6.0
func (t HydratedDataTuple) Items() []HydratedData
func (HydratedDataTuple) Len ¶ added in v0.6.0
func (t HydratedDataTuple) Len() int
type HydratedEndpoint ¶ added in v0.6.0
type HydratedEndpoint interface {
HydratedWire
Wire() HydratedWire
Receive(func(HydratedValue, ReceivedContext)) (func(), error)
Closed() <-chan struct{}
Termination() Termination
Close() error
}
HydratedEndpoint owns receiving and closure. Convey only Wire(), on every path.
type HydratedFrame ¶ added in v0.6.0
type HydratedFrame struct {
Scope, ID core.Atom
Body HydratedData
}
func UnpackHydratedFrame ¶ added in v0.6.0
func UnpackHydratedFrame(value core.Value, limits HydratedCodecLimits) (HydratedFrame, error)
type HydratedReference ¶ added in v0.6.0
type HydratedReference struct {
// contains filtered or unexported fields
}
HydratedReference describes a reference. Valid shape implies no liveness or authority.
func NewHydratedReference ¶ added in v0.6.0
func NewHydratedReference(path Path, scope, id core.Atom) (HydratedReference, error)
func UnpackHydratedReference ¶ added in v0.6.0
func UnpackHydratedReference(value core.Value, limits HydratedCodecLimits) (HydratedReference, error)
func (HydratedReference) ID ¶ added in v0.6.0
func (r HydratedReference) ID() core.Atom
func (HydratedReference) Path ¶ added in v0.6.0
func (r HydratedReference) Path() Path
func (HydratedReference) Scope ¶ added in v0.6.0
func (r HydratedReference) Scope() core.Atom
type HydratedTuple ¶ added in v0.6.0
type HydratedTuple = ontoswire.NativeTuple[HydratedWire]
HydratedTuple returns captured children, without exposing mutable storage. Runtime construction collapses a wholly ground tuple to ontos.Tuple.
type HydratedValue ¶ added in v0.6.0
type HydratedValue = ontoswire.NativeValue
HydratedValue admits only an ontos Atom/Tuple, a finite immutable HydratedTuple, or a runtime-recognized HydratedWire. An arbitrary Go value is invalid. This open union lets runtimes own recognition without extending ontos.Value.
type HydratedWire ¶ added in v0.6.0
type HydratedWire interface{ Send(HydratedValue) error }
HydratedWire grants sending only; success means local admission.
type ReceivedContext ¶ added in v0.6.0
type ReceivedContext = any
ReceivedContext is established by composition, never supplied by message data.
type Termination ¶ added in v0.4.0
type Wire ¶
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]