server

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 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
	WorkspaceDriveSize       string
	SandboxCPU               string
	SandboxMemory            string
	IdleTimeout              string
	WsMaxTotalCPU            string
	WsMaxTotalMemory         string
	WsMaxIdleTimeout         string
}

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. "cli.cs.ac.cn" — used for subdomain routing
	BaseScheme          string // e.g. "https" — scheme for generated URLs
	OpencodeAssetDomain string // e.g. "opencodeapp.agentserver.dev" — shared static asset domain
	// 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) *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

Jump to

Keyboard shortcuts

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