Versions in this module Expand all Collapse all v0 v0.2.0 Feb 19, 2023 Changes in this version type Conn + func (c *Conn) Pump(ctx context.Context) Pump + type Pump interface + Ch func() <-chan Errable + Err func() error v0.1.0 Feb 9, 2023 Changes in this version + func WriteHTTPError(w http.ResponseWriter, statusCode int, message string) error + type Command struct + Request RequestT + func (c Command[RequestT, ReplyT]) Err(format string, args ...interface{}) error + func (c Command[RequestT, ReplyT]) FromRaw(r RawCommand) (Errable, error) + func (c Command[RequestT, ReplyT]) OK(reply ReplyT) error + type CommandDecoder struct + func (c *CommandDecoder) Decode() (Errable, error) + type CommandMeta struct + Command string + ID string + type CommandPalette map[string]fromRawable + type Conn struct + func NewConn(w http.ResponseWriter, r *http.Request, palette CommandPalette) (*Conn, error) + func (c *Conn) Close() error + func (c *Conn) SendMessage(m Message) error + type Errable interface + Err func(format string, args ...interface{}) error + type Message interface + Type func() string + type RawCommand = Command[json.RawMessage, any] + type Response struct + Error string + OK bool + Response ResponseT