Versions in this module Expand all Collapse all v0 v0.3.0 Oct 29, 2026 Changes in this version + type Caller struct + Attached []string + EventScope string + ID int + func CallerFrom(ctx context.Context) Caller + func (c Caller) Has(sessionID string) bool type Server + func (s *Server) Callers() []Caller + func (s *Server) Connections() int + func (s *Server) EmitAttachAll(event any) (int64, error) v0.2.0 Oct 29, 2026 v0.1.0 Oct 29, 2026 Changes in this version + const Subprotocol + func BlockEventOf(sessionID, blockID, creator, name string, payload any) any + func DefaultWelcome(Hello) any + func EventOf(typ string, payload any) any + func SessionEventOf(sessionID, typ string, payload any) any + type Close struct + Code websocket.StatusCode + Reason string + type Error struct + Code string + Message string + Status int + func (e *Error) Error() string + type HandlerFunc func(ctx context.Context, req Request) (result any, err *Error) + type Hello struct + APIMinRevision int + APIRevision int + Client json.RawMessage + Raw []byte + ReconnectToken string + Type string + type Request struct + ID string + Method string + Payload json.RawMessage + type Server struct + URL string + func New(t testing.TB) *Server + func (s *Server) Close() + func (s *Server) CloseConn(code websocket.StatusCode, reason string) error + func (s *Server) Drop() error + func (s *Server) Emit(event any) (int64, error) + func (s *Server) Errs() []error + func (s *Server) Fail(method, code string, status int, message string) + func (s *Server) HTTPClient() *http.Client + func (s *Server) Handle(method string, h HandlerFunc) + func (s *Server) Hellos() []Hello + func (s *Server) Reply(method string, result any) + func (s *Server) Requests() []Request + func (s *Server) Send(msg any) error + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (s *Server) SetWelcome(f WelcomeFunc) + func (s *Server) WaitConnected(ctx context.Context) error + type WelcomeFunc func(Hello) any