Help us shape the future of Go! Take the 2026 Go Developer Survey

bridge

package
v0.19.12 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package bridge supplies explicit filesystem and IPC adapters for Orb Bridge.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(ctx context.Context, path string, auth Auth, handler protocol.Handler, generation func(string) error) (*protocol.Conn, error)

func Dir added in v0.19.1

func Dir(profile string) (string, error)

Dir is a Bridge profile's directory: under ORB_BRIDGE_HOME, else beside an explicit agent dir, else ~/.orb/bridge.

func Listen

func Listen(ctx context.Context, path string, b *bridge.Bridge, adminSecret string, admin protocol.Handler) (func(), error)

func ValidName added in v0.19.1

func ValidName(s string) bool

ValidName reports whether s can name a Bridge profile or peer alias.

Types

type Auth

type Auth struct {
	Credential string `json:"credential"`
	InstanceID string `json:"instance_id,omitempty"`
	BootID     string `json:"boot_id,omitempty"`
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is one Bridge document behind the profile's single-owner lock: the supplied document when native storage is open, else a private file. The lock makes this process the only writer, so the last value read or written stays authoritative and is served from memory.

func OpenStore

func OpenStore(path string, quota int, document host.Document) (*Store, error)

OpenStore takes the lock beside path; closing the store never closes document.

func (*Store) Close

func (s *Store) Close() error

func (*Store) Read added in v0.14.0

func (s *Store) Read(ctx context.Context) ([]byte, error)

func (*Store) Update added in v0.14.0

func (s *Store) Update(ctx context.Context, change func([]byte) ([]byte, error)) error

Update commits change's result; nil removes the document. A failed write refuses all later access until a new owner reopens and reconciles the store.

type Welcome

type Welcome struct {
	Generation string `json:"generation,omitempty"`
}

Directories

Path Synopsis
Package daemon is the native Bridge service: the process `orb bridge run` serves, reached over private IPC sockets in the profile directory, its peers over Tailcat and WebSocket, the machine-level calls it answers peers (host.*), and its installation as a systemd user service or on a server over SSH.
Package daemon is the native Bridge service: the process `orb bridge run` serves, reached over private IPC sockets in the profile directory, its peers over Tailcat and WebSocket, the machine-level calls it answers peers (host.*), and its installation as a systemd user service or on a server over SSH.

Jump to

Keyboard shortcuts

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