Documentation
¶
Index ¶
- Constants
- func IsValidCodeSpaceID(id string) bool
- type Options
- type Service
- func (s *Service) AI() *ai.Service
- func (s *Service) CancelCodeRuntimeOperation(ctx context.Context) (gateway.CodeRuntimeStatus, error)
- func (s *Service) Close() error
- func (s *Service) CodeRuntimeStatus(ctx context.Context) (gateway.CodeRuntimeStatus, error)
- func (s *Service) CreateSpace(ctx context.Context, req gateway.CreateSpaceRequest) (*gateway.SpaceStatus, error)
- func (s *Service) DeleteSpace(ctx context.Context, codeSpaceID string) error
- func (s *Service) ExternalOriginForCodeSpace(codeSpaceID string) (string, error)
- func (s *Service) ExternalOriginForEnvApp(envPublicID string) (string, error)
- func (s *Service) ExternalOriginForPortForward(forwardID string) (string, error)
- func (s *Service) Gateway() *gateway.Gateway
- func (s *Service) GatewayURL() string
- func (s *Service) InstallCodeRuntime(ctx context.Context) (gateway.CodeRuntimeStatus, error)
- func (s *Service) ListSpaces(ctx context.Context) ([]gateway.SpaceStatus, error)
- func (s *Service) RemoveCodeRuntimeVersion(ctx context.Context, version string) (gateway.CodeRuntimeStatus, error)
- func (s *Service) ResolveCodeServerPort(ctx context.Context, codeSpaceID string) (int, error)
- func (s *Service) SelectCodeRuntimeVersion(ctx context.Context, version string) (gateway.CodeRuntimeStatus, error)
- func (s *Service) StartSpace(ctx context.Context, codeSpaceID string) (*gateway.SpaceStatus, error)
- func (s *Service) StopSpace(ctx context.Context, codeSpaceID string) error
- func (s *Service) UpdateSpace(ctx context.Context, codeSpaceID string, req gateway.UpdateSpaceRequest) (*gateway.SpaceStatus, error)
Constants ¶
View Source
const (
// FloeAppCode is the floe_app id used for code-server sessions.
FloeAppCode = "com.floegence.redeven.code"
)
Variables ¶
This section is empty.
Functions ¶
func IsValidCodeSpaceID ¶
IsValidCodeSpaceID enforces a DNS-safe label: - allowed: [a-z0-9-] - length: 1..48 - no leading/trailing '-'
It intentionally matches the control-plane validation to avoid subtle routing bugs.
Types ¶
type Options ¶
type Options struct {
Logger *slog.Logger
StateDir string
StateRoot string
// ConfigPath is the absolute path to the runtime config file (used to persist settings updates from the Env App UI).
ConfigPath string
ControlplaneBaseURL string
// CodeServerPortMin/Max configures the dynamic port range used for code-server processes.
// If unset/invalid, a safe default range is used.
CodeServerPortMin int
CodeServerPortMax int
// Env/App-level context (used by AI tools).
AgentHomeDir string
Shell string
AIConfig *config.AIConfig
DesktopAIBroker *ai.DesktopAIBrokerEndpoint
Audit *auditlog.Store
Diagnostics *diagnostics.Store
Terminal *terminal.Manager
// LocalUIEnabled enables Local UI-specific runtime behavior such as shorter
// code-server reconnection grace and local gateway routing.
LocalUIEnabled bool
ResolveSessionMeta func(channelID string) (*session.Meta, bool)
ResolveSessionTunnelURL func(channelID string) (string, bool)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CancelCodeRuntimeOperation ¶
func (*Service) CodeRuntimeStatus ¶
func (*Service) CreateSpace ¶
func (s *Service) CreateSpace(ctx context.Context, req gateway.CreateSpaceRequest) (*gateway.SpaceStatus, error)
func (*Service) DeleteSpace ¶
func (*Service) ExternalOriginForCodeSpace ¶
func (*Service) ExternalOriginForEnvApp ¶
func (*Service) ExternalOriginForPortForward ¶
func (*Service) GatewayURL ¶
func (*Service) InstallCodeRuntime ¶
func (*Service) ListSpaces ¶
func (*Service) RemoveCodeRuntimeVersion ¶
func (*Service) ResolveCodeServerPort ¶
func (*Service) SelectCodeRuntimeVersion ¶
func (*Service) StartSpace ¶
func (*Service) UpdateSpace ¶
func (s *Service) UpdateSpace(ctx context.Context, codeSpaceID string, req gateway.UpdateSpaceRequest) (*gateway.SpaceStatus, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.