Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRouter ¶
func NewRouter(opts RouterOptions) http.Handler
NewRouter returns the control-plane router. When Templates is set in RouterOptions, the /templates, /v3/templates, and /v2/templates/{id} routes are wired alongside the sandbox routes.
Types ¶
type RouterOptions ¶
type RouterOptions struct {
Manager sandboxManager
Runtime runtime.Runtime
Provider versionProvider
// Templates is the Phase 3 template store (internal/template.Store
// or a fake in tests). Pass nil to serve only the Phase 1 routes.
Templates templateStore
// Builds is the async template BuildManager. Required only for
// the build start/status/logs endpoints; CRUD-only deployments
// can leave it nil.
Builds buildManager
// FileCache and FileSigner power the SDK's Template.build() file
// upload path. Both must be set together; if either is nil, the
// file endpoints are skipped.
FileCache *filecache.Cache
FileSigner *filecache.Signer
// PublicBase is the externally reachable base URL of the edvabe
// listener (e.g. "http://localhost:3000"). Used when minting
// upload URLs. If empty, falls back to the inbound Host header.
PublicBase string
}
RouterOptions bundles the handlers' collaborators. Templates is optional — passing nil disables the template endpoints, which lets Phase 1 deployments continue to run with only the sandbox routes.
Click to show internal directories.
Click to hide internal directories.