Documentation
¶
Index ¶
- type LayoutServer
- func (s *LayoutServer) DrainLayoutUpdates()
- func (s *LayoutServer) GetLayoutModel() *s4wave_layout.LayoutModel
- func (s *LayoutServer) GetPort() int
- func (s *LayoutServer) SetLayoutModel(model *s4wave_layout.LayoutModel)
- func (s *LayoutServer) Start(ctx context.Context) (int, error)
- func (s *LayoutServer) Stop(ctx context.Context) error
- func (s *LayoutServer) WaitForLayoutUpdate(ctx context.Context) (*s4wave_layout.LayoutModel, error)
- func (s *LayoutServer) WaitForNavigateTab(ctx context.Context) (*s4wave_layout.NavigateTabRequest, error)
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LayoutServer ¶
type LayoutServer struct {
// contains filtered or unexported fields
}
LayoutServer serves the browser layout test RPC surface over WebSocket.
func NewLayoutServer ¶
func NewLayoutServer(le *logrus.Entry) *LayoutServer
NewLayoutServer creates a new LayoutServer.
func (*LayoutServer) DrainLayoutUpdates ¶
func (s *LayoutServer) DrainLayoutUpdates()
DrainLayoutUpdates drains any pending layout updates.
func (*LayoutServer) GetLayoutModel ¶
func (s *LayoutServer) GetLayoutModel() *s4wave_layout.LayoutModel
GetLayoutModel returns the current layout model.
func (*LayoutServer) GetPort ¶
func (s *LayoutServer) GetPort() int
GetPort returns the port the server is listening on, or 0 if not running.
func (*LayoutServer) SetLayoutModel ¶
func (s *LayoutServer) SetLayoutModel(model *s4wave_layout.LayoutModel)
SetLayoutModel publishes the server-side layout model to connected clients.
func (*LayoutServer) Start ¶
func (s *LayoutServer) Start(ctx context.Context) (int, error)
Start starts the WebSocket server on an available loopback port.
func (*LayoutServer) Stop ¶
func (s *LayoutServer) Stop(ctx context.Context) error
Stop stops the server.
func (*LayoutServer) WaitForLayoutUpdate ¶
func (s *LayoutServer) WaitForLayoutUpdate(ctx context.Context) (*s4wave_layout.LayoutModel, error)
WaitForLayoutUpdate waits for the next frontend layout update.
func (*LayoutServer) WaitForNavigateTab ¶
func (s *LayoutServer) WaitForNavigateTab(ctx context.Context) (*s4wave_layout.NavigateTabRequest, error)
WaitForNavigateTab waits for the next frontend tab navigation request.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server exposes an srpc.Mux over WebSocket for browser E2E tests.