Documentation
¶
Overview ¶
Custom code. Not generated by Stainless.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveBinaryPath ¶
ResolveBinaryPath ensures the local mode binary exists and returns its path.
Types ¶
type ServerManager ¶
type ServerManager struct {
// contains filtered or unexported fields
}
ServerManager manages the lifecycle of local mode.
func NewServerManager ¶
func NewServerManager() (*ServerManager, error)
NewServerManager creates a new ServerManager. It resolves the binary path immediately and returns an error if not found.
func (*ServerManager) Close ¶
func (m *ServerManager) Close() error
Close stops local mode gracefully. It sends SIGTERM first, waits up to 3 seconds, then sends SIGKILL if needed.
func (*ServerManager) EnsureRunning ¶
func (m *ServerManager) EnsureRunning(ctx context.Context) (string, error)
EnsureRunning starts local mode if not already running and waits for it to be ready. Returns the base URL of the running process.
func (*ServerManager) SetBrowserbaseAPIKey ¶ added in v3.1.1
func (m *ServerManager) SetBrowserbaseAPIKey(key string)
SetBrowserbaseAPIKey sets the Browserbase API key used by local mode.
func (*ServerManager) SetBrowserbaseProjectID ¶ added in v3.1.1
func (m *ServerManager) SetBrowserbaseProjectID(projectID string)
SetBrowserbaseProjectID sets the Browserbase project ID used by local mode.
func (*ServerManager) SetModelAPIKey ¶
func (m *ServerManager) SetModelAPIKey(key string)
SetModelAPIKey sets the model API key used when starting local mode.