Help us shape the future of Go! Take the 2026 Go Developer Survey

demo

package
v1.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DemoServer

type DemoServer struct {
	// contains filtered or unexported fields
}

DemoServer manages a stapler-squad server instance for demo recording.

func StartDemoServer

func StartDemoServer(t *testing.T) *DemoServer

StartDemoServer seeds a fresh SQLite database with mock sessions and starts the server binary in test mode. It does NOT wait for the server to be healthy – call WaitForHealth after calling this.

func (*DemoServer) SeedMockSessions

func (s *DemoServer) SeedMockSessions(count int) error

SeedMockSessions writes realistic demo sessions directly into the SQLite database before the server starts, so no tmux processes are required.

func (*DemoServer) Stop

func (s *DemoServer) Stop()

Stop terminates the server process and removes the temp data directory.

func (*DemoServer) URL

func (s *DemoServer) URL() string

URL returns the base URL of the demo server.

func (*DemoServer) WaitForHealth

func (s *DemoServer) WaitForHealth(timeout time.Duration) error

WaitForHealth polls /health until the server is ready or the timeout expires.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL