Documentation
¶
Overview ¶
Package workerproto defines the bounded wire format shared by the browser broker and isolated runtime workers.
Index ¶
Constants ¶
View Source
const ( Version = 1 MaxMessageBytes = 1 << 20 )
Variables ¶
This section is empty.
Functions ¶
func DecodePayload ¶
func DecodePayload(payload json.RawMessage, target any) error
func MarshalPayload ¶
func MarshalPayload(value any) (json.RawMessage, error)
Types ¶
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
Codec reads and writes big-endian length-prefixed JSON messages.
type Envelope ¶
type Envelope struct {
Version int `json:"version"`
Kind Kind `json:"kind"`
ID uint64 `json:"id,omitempty"`
Method string `json:"method,omitempty"`
Payload json.RawMessage `json:"payload,omitempty"`
Error string `json:"error,omitempty"`
}
Envelope is one versioned request, response, or one-way event.
Click to show internal directories.
Click to hide internal directories.