Documentation
¶
Overview ¶
Package bridge exposes a verified CTX backend as a CTX endpoint. It changes transport, not domain meaning. Both sides retain their own admission policy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeJSONLine ¶
ServeJSONLine owns relay and conn. It monitors connection EOF while an invocation is running, so a disconnected host cancels upstream work too. Conn.Close must unblock Read and Write. Read-ahead is bounded by io.Copy's buffer and the pipe; this is not an unbounded request queue.
Types ¶
type Relay ¶
type Relay struct {
// contains filtered or unexported fields
}
func New ¶
New takes ownership of a ready, policy-enforcing session. This permits engine bindings to provide shared mechanics without nesting a second Go Session.
func (*Relay) Close ¶
Close aborts upstream I/O and releases the backend exactly once. The serving frontend must call it on EOF, transport error and cancellation.
type Session ¶
type Session interface {
State() plugin.State
Descriptor() plugin.Descriptor
Call(context.Context, plugin.ContractRef, string, json.RawMessage) (json.RawMessage, error)
Close(context.Context) error
Abort() error
}
Relay owns one upstream Session. Incoming calls keep their external ID; the upstream Session assigns independent IDs. No retries or authority forwarding are implicit. A bridge's upstream credentials belong to its configured policy.