transport

package
v0.56.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignHTTPRequest

func SignHTTPRequest(req *http.Request, body []byte, priv bifrost_crypto.PrivKey, pid peer.ID, envPfx string) error

SignHTTPRequest signs an HTTP request using the Spacewave SigningPayload proto binary + Ed25519 wire format.

Types

type SessionTransport

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

SessionTransport manages a session-scoped child bus with bifrost transport controllers bound to the session's peer identity.

func NewSessionTransport

func NewSessionTransport(
	le *logrus.Entry,
	parentBus bus.Bus,
	sessionKey bifrost_crypto.PrivKey,
	signalingURL string,
	signingEnvPfx string,
	opts ...SessionTransportOption,
) (*SessionTransport, error)

NewSessionTransport constructs a new session-scoped transport.

The child bus is created in Execute. The sessionKey is the session's Ed25519 private key used as the transport peer identity.

signalingURL is the cloud API base URL for the SignalingDO endpoint. If empty, WebRTC and signaling controllers are not started.

func (*SessionTransport) AwaitReady

func (t *SessionTransport) AwaitReady(ctx context.Context) error

AwaitReady blocks until the transport's child bus is created and base controllers are started, or until ctx is canceled.

func (*SessionTransport) Execute

func (t *SessionTransport) Execute(ctx context.Context) error

Execute creates the child bus with bifrost transport controllers and blocks until ctx is canceled.

func (*SessionTransport) GetChildBus

func (t *SessionTransport) GetChildBus() bus.Bus

GetChildBus returns the child bus, or nil if not yet started.

func (*SessionTransport) GetLinkSnapshotsWithWait added in v0.54.0

func (t *SessionTransport) GetLinkSnapshotsWithWait() ([]transport_controller.LinkSnapshot, <-chan struct{})

GetLinkSnapshotsWithWait returns live link snapshots and a wait channel that closes when the transport link set changes.

func (*SessionTransport) GetLinkedPeerIDsSnapshotWithWait added in v0.51.7

func (t *SessionTransport) GetLinkedPeerIDsSnapshotWithWait(peerIDs []peer.ID) (map[peer.ID]struct{}, <-chan struct{})

GetLinkedPeerIDsSnapshotWithWait returns linked peer IDs and a wait channel that closes when the transport link set changes.

func (*SessionTransport) GetPeerID

func (t *SessionTransport) GetPeerID() peer.ID

GetPeerID returns the transport's peer ID.

func (*SessionTransport) Ready

func (t *SessionTransport) Ready() <-chan struct{}

Ready returns a channel that is closed when the child bus and base controllers are started.

type SessionTransportOption added in v0.56.1

type SessionTransportOption func(*SessionTransport)

SessionTransportOption configures child-bus directive routing.

func WithBridgeDirectiveFilter added in v0.56.1

func WithBridgeDirectiveFilter(filter bus_bridge.FilterFn) SessionTransportOption

WithBridgeDirectiveFilter excludes matching directives from the generic child-to-parent bridge while preserving the transport package's ownership.

Jump to

Keyboard shortcuts

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