Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProtocolVersion = "redeven-desktop-bridge-v1" FrameTypeHello = "hello" FrameTypeStreamOpen = "stream_open" FrameTypeStreamData = "stream_data" FrameTypeStreamClose = "stream_close" FrameTypeStreamError = "stream_error" FrameTypeShutdownRuntime = "shutdown_runtime" FrameTypePing = "ping" FrameTypePong = "pong" )
View Source
const (
MaxPayloadBytes = 16 << 20
)
Variables ¶
This section is empty.
Functions ¶
func WriteFrame ¶
func WriteFrame(w io.Writer, header FrameHeader, payload []byte) error
Types ¶
type FrameHeader ¶
type FrameHeader struct {
ProtocolVersion string `json:"protocol_version"`
StreamID string `json:"stream_id"`
Type string `json:"type"`
PayloadBytes int64 `json:"payload_bytes,omitempty"`
}
func NormalizeFrameHeader ¶
func NormalizeFrameHeader(header FrameHeader) (FrameHeader, error)
type GatewayProtocol ¶ added in v0.7.1
type GatewayProtocol struct {
Available bool `json:"available"`
}
type Hello ¶
type Hello struct {
ProtocolVersion string `json:"protocol_version"`
RuntimeVersion string `json:"runtime_version"`
RuntimeCommit string `json:"runtime_commit,omitempty"`
StartedAtUnixMS int64 `json:"started_at_unix_ms,omitempty"`
LocalUI HelloLocalUI `json:"local_ui"`
RuntimeControl RuntimeControl `json:"runtime_control"`
RuntimeService any `json:"runtime_service"`
GatewayProtocol GatewayProtocol `json:"gateway_protocol,omitempty"`
}
type HelloLocalUI ¶
type RuntimeControl ¶
type Server ¶
type Server struct {
DialSurface SurfaceDialer
Hello Hello
OnShutdown func()
// contains filtered or unexported fields
}
type StreamError ¶
type StreamOpen ¶
type StreamOpen struct {
Surface StreamSurface `json:"surface"`
}
type StreamSurface ¶
type StreamSurface string
const ( StreamSurfaceLocalUI StreamSurface = "local_ui" StreamSurfaceRuntimeControl StreamSurface = "runtime_control" StreamSurfaceGatewayProtocol StreamSurface = "gateway_protocol" )
type SurfaceDialer ¶
func NewURLSurfaceDialer ¶
func NewURLSurfaceDialer(localUIURL string, runtimeControlURL string) SurfaceDialer
func NewURLSurfaceDialerWithGateway ¶ added in v0.7.1
func NewURLSurfaceDialerWithGateway(localUIURL string, runtimeControlURL string, gatewayURL string, managedGatewayBridgeToken string) SurfaceDialer
Click to show internal directories.
Click to hide internal directories.