server

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceDefaults added in v0.7.0

type ResourceDefaults struct {
	MaxWorkspacesPerUser     int
	MaxSandboxesPerWorkspace int
	MaxWorkspaceDriveSize    int64 // bytes
	MaxSandboxCPU            int   // millicores
	MaxSandboxMemory         int64 // bytes
	MaxIdleTimeout           int   // seconds
	WsMaxTotalCPU            int   // millicores
	WsMaxTotalMemory         int64 // bytes
	WsMaxIdleTimeout         int   // seconds
}

ResourceDefaults holds all resolved system-wide defaults.

type Server

type Server struct {
	Auth                    *auth.Auth
	OIDC                    *auth.OIDCManager
	DB                      *db.DB
	Sandboxes               *sbxstore.Store
	ProcessManager          process.Manager
	DriveManager            storage.DriveManager
	NamespaceManager        *namespace.Manager
	TunnelRegistry          *tunnel.Registry
	StaticFS                fs.FS
	OpencodeStaticFS        fs.FS  // embedded opencode frontend dist (served on subdomain requests)
	BaseDomain              string // e.g. "agentserver.dev" — used for subdomain routing
	OpencodeAssetDomain     string // e.g. "opencodeapp.agentserver.dev" — shared static asset domain
	OpencodeSubdomainPrefix string // e.g. "code" — subdomain: code-{id}.{baseDomain}
	OpenclawSubdomainPrefix string // e.g. "claw" — subdomain: claw-{id}.{baseDomain}
	PasswordAuthEnabled     bool   // when false, /api/auth/login and /api/auth/register are not registered
	// contains filtered or unexported fields
}

func New

func New(a *auth.Auth, oidcMgr *auth.OIDCManager, database *db.DB, sandboxStore *sbxstore.Store, processManager process.Manager, driveManager storage.DriveManager, nsMgr *namespace.Manager, tunnelReg *tunnel.Registry, staticFS fs.FS, opcodeStaticFS fs.FS, passwordAuthEnabled bool) *Server

func (*Server) GetEffectiveIdleTimeout added in v0.7.0

func (s *Server) GetEffectiveIdleTimeout() time.Duration

GetEffectiveIdleTimeout is the exported version for use by cmd/serve.go.

func (*Server) Router

func (s *Server) Router() http.Handler

type WorkspaceDefaults added in v0.9.0

type WorkspaceDefaults struct {
	MaxSandboxes     int
	MaxSandboxCPU    int   // millicores
	MaxSandboxMemory int64 // bytes
	MaxIdleTimeout   int   // seconds
	MaxTotalCPU      int   // millicores
	MaxTotalMemory   int64 // bytes
	MaxDriveSize     int64 // bytes
}

WorkspaceDefaults holds workspace-level resolved defaults (system defaults <- workspace_quotas override).

Jump to

Keyboard shortcuts

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