Documentation
¶
Overview ¶
Package bridge owns connectivity authority, never agent execution or sessions.
Index ¶
- func ParsePeerID(id string) (ed25519.PublicKey, error)
- func PeerID(key ed25519.PublicKey) string
- type Bridge
- func (b *Bridge) AddGrant(g Grant) error
- func (b *Bridge) Admin(_ context.Context, method string, params json.RawMessage) (json.RawMessage, error)
- func (b *Bridge) Allowed(p connect.Principal, id, permission string) bool
- func (b *Bridge) Approve(id, claimant string) error
- func (b *Bridge) Attach(id, credential, boot string, endpoint connect.Endpoint) (string, error)
- func (b *Bridge) Authorize(r connect.Request) bool
- func (b *Bridge) Available(id string) bool
- func (b *Bridge) Block(peer string) error
- func (b *Bridge) Call(ctx context.Context, p connect.Principal, call connect.Call) (json.RawMessage, error)
- func (b *Bridge) Catalog(p connect.Principal) []Instance
- func (b *Bridge) Changes() <-chan struct{}
- func (b *Bridge) Claim(peer, id, token string, locators ...string) (Invitation, error)
- func (b *Bridge) Close() error
- func (b *Bridge) Connect(ctx context.Context, stream net.Conn, expected string, server bool) (*protocol.Conn, string, error)
- func (b *Bridge) Connection(peer string) *protocol.Conn
- func (b *Bridge) Contacts(peer, scope string) ([]Record, error)
- func (b *Bridge) Detach(id, generation string)
- func (b *Bridge) Enroll(alias, group string) (Instance, string, error)
- func (b *Bridge) Handle(ctx context.Context, peer, method string, params json.RawMessage) (json.RawMessage, error)
- func (b *Bridge) Hello() Hello
- func (b *Bridge) Invite(grants []Grant) (Invitation, error)
- func (b *Bridge) MergeContact(sender string, r Record) (bool, error)
- func (b *Bridge) Outbound(instance, peer string, call connect.Call) (connect.Subject, error)
- func (b *Bridge) PairStatus(peer, id string) (Invitation, error)
- func (b *Bridge) PeerID() string
- func (b *Bridge) PeerLocator(peer string) (string, error)
- func (b *Bridge) PersonalGroup() string
- func (b *Bridge) Principal() connect.Principal
- func (b *Bridge) PublishContact(scope, name string, endpoints []Locator, withdraw bool) (Record, error)
- func (b *Bridge) SavePeer(peer, locator string) error
- func (b *Bridge) SaveTransportState(raw json.RawMessage) error
- func (b *Bridge) SetScope(id string, peers []string) error
- func (b *Bridge) TLSConfig(expected string, server bool) (*tls.Config, error)
- func (b *Bridge) TransportState() json.RawMessage
- type Contact
- type Grant
- type Hello
- type Instance
- type Invitation
- type Locator
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
func (*Bridge) Admin ¶
func (b *Bridge) Admin(_ context.Context, method string, params json.RawMessage) (json.RawMessage, error)
Admin is deliberately absent from the remote routing table. Hosts expose it only after local-owner authentication.
func (*Bridge) Claim ¶
func (b *Bridge) Claim(peer, id, token string, locators ...string) (Invitation, error)
func (*Bridge) Connect ¶
func (b *Bridge) Connect(ctx context.Context, stream net.Conn, expected string, server bool) (*protocol.Conn, string, error)
Connect authenticates a caller-supplied stream. It never creates a listener, locates a profile, or starts an agent runtime.
func (*Bridge) Connection ¶
Connection returns an existing authenticated channel in either direction.
func (*Bridge) Handle ¶
func (b *Bridge) Handle(ctx context.Context, peer, method string, params json.RawMessage) (json.RawMessage, error)
func (*Bridge) PairStatus ¶
func (b *Bridge) PairStatus(peer, id string) (Invitation, error)
func (*Bridge) PersonalGroup ¶
func (*Bridge) PublishContact ¶
func (*Bridge) SaveTransportState ¶
func (b *Bridge) SaveTransportState(raw json.RawMessage) error
func (*Bridge) TransportState ¶
func (b *Bridge) TransportState() json.RawMessage
type Contact ¶
type Contact struct {
Schema string `json:"schema"`
Scope string `json:"scope_id"`
Peer string `json:"peer_id"`
Revision string `json:"revision"`
Name string `json:"display_name"`
Protocols []string `json:"protocols"`
Endpoints []Locator `json:"endpoints"`
Withdrawn bool `json:"withdrawn"`
Extensions map[string]json.RawMessage `json:"extensions,omitempty"`
}
type Grant ¶
type Grant struct {
ID string `json:"grant_id,omitempty"`
Principal connect.Principal `json:"principal"`
GroupID string `json:"group_id,omitempty"`
IncludeFuture bool `json:"include_future"`
Instances []string `json:"instances,omitempty"`
Permissions []string `json:"permissions"`
Destination string `json:"destination,omitempty"`
}
type Invitation ¶
type Invitation struct {
ClaimantLocator string `json:"claimant_locator,omitempty"`
ID string `json:"invitation_id"`
PeerID string `json:"peer_id"`
Token string `json:"token,omitempty"`
Locator string `json:"locator,omitempty"`
Expires int64 `json:"expires"`
Grants []Grant `json:"grants"`
Claimant string `json:"claimant,omitempty"`
Status string `json:"status"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent exposes independently opt-in, source-attributed bridge tools.
|
Package agent exposes independently opt-in, source-attributed bridge tools. |
|
hosts
|
|
|
native
Package native supplies explicit filesystem and IPC adapters for Orb Bridge.
|
Package native supplies explicit filesystem and IPC adapters for Orb Bridge. |
|
transports
|
|
|
tailcat
Package tailcat supplies stream transport only.
|
Package tailcat supplies stream transport only. |
Click to show internal directories.
Click to hide internal directories.