workspace

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package workspace provides workspace directory setup and management.

Index

Constants

View Source
const BasePort = 4096

BasePort is the internal port that opencode serve binds to inside the container. Host-side ports are assigned as BasePort + alphabetical workspace index.

Variables

This section is empty.

Functions

func MatchesCWD

func MatchesCWD(ws *Resolved, cwd string) bool

func PortForWorkspace

func PortForWorkspace(cfg *config.Config, name string) int

Types

type Resolved

type Resolved struct {
	Name            string
	Paths           []string
	Port            int
	AllowedHosts    []string
	AllowedNetworks []string
	BuildContext    string
	Dockerfile      string
	Image           string
	Env             []string
}

func Resolve

func Resolve(cfg *config.Config, name string) (*Resolved, error)

func ResolveFromCWD

func ResolveFromCWD(cfg *config.Config, cwd string) (*Resolved, string, error)

Jump to

Keyboard shortcuts

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