Documentation
¶
Overview ¶
Package imagebridge transports bounded normalized images into one live remote Coding TUI without creating files or durable Runtime events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrProtocol means a bridge frame or token violated the fixed wire contract. ErrProtocol = errors.New("coding image bridge: invalid protocol") // ErrDeadline means a bridge frame expired or requested an excessive lifetime. ErrDeadline = errors.New("coding image bridge: invalid deadline") // ErrPeer means a Unix socket peer did not match the owning user. ErrPeer = errors.New("coding image bridge: invalid peer") ErrUnavailable = errors.New("coding image bridge: unavailable") // ErrBusy means the live TUI inbox has reached its fixed capacity. ErrBusy = errors.New("coding image bridge: busy") // ErrClosed means the live bridge has stopped. ErrClosed = errors.New("coding image bridge: closed") )
Functions ¶
func Encode ¶
Encode writes one complete strict frame. The caller owns framing EOF, such as closing the write half of a Unix connection after this function returns.
func Send ¶
Send validates the endpoint and transfers one image to the matching live bridge, waiting for its bounded acknowledgement.
func ValidateNonce ¶
ValidateNonce accepts only the canonical 256-bit base64url representation.
Types ¶
type Frame ¶
type Frame struct {
Image attachment.Image
Notice Notice
Deadline time.Time
}
Frame is one validated image or notice with its original absolute deadline.
type Notice ¶
type Notice uint8
Notice is an allowlisted bridge acknowledgement.
const ( // NoticeUnknown is the zero value and never valid on the wire. NoticeUnknown Notice = iota // NoticeAccepted confirms that the live TUI accepted an image. NoticeAccepted // NoticeBusy reports that the fixed live TUI inbox is full. NoticeBusy // NoticeRejected reports invalid image input without echoing details. NoticeRejected )
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server owns one nonce-scoped private Unix socket and bounded image inbox.