Documentation
¶
Overview ¶
Package sandboxes runs cloud sandboxes for podium-server.
A node is a machine of your own. A cloud provider is not one, and nobody should have to run a process to use it: configuring the provider on the Sandboxes screen is the whole of the setup. So for every configured provider the server runs that provider's RUNNER itself — the node machinery (internal/node) driving the provider's API, with the same executor, relay, event buffering, previews and adoption a node has — connected to the server's own node service in memory. To the scheduler it is a node with the provider's labels, which is how the existing placement, capacity and lease logic covers it unchanged; to an operator it is the provider, on the Sandboxes screen, and it never appears among their nodes.
A runner's sandboxes are recorded under the server's state directory, so a restarted server adopts them. A provider removed from the Sandboxes screen stops its runner; one whose pool or cap changes is restarted with the new settings, adopting what was running.
Index ¶
Constants ¶
const ( SettingPoolSize = "pool_size" SettingPoolImage = "pool_image" )
The provider settings that configure its runner rather than the provider itself.
const ManagedLabel = store.ManagedNodeLabel
ManagedLabel marks a node row that is a provider's runner rather than a machine.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager runs one runner per configured sandbox provider.
func (*Manager) Run ¶
Run keeps a runner going for every configured provider until ctx ends, then stops them all.
type Options ¶
type Options struct {
Store *store.Store
// NodeService is the server's node service handler, served to runners in memory.
NodeService http.Handler
// ServerID names this server; a runner's node row is this server's, for its provider.
ServerID string
// Dir is where runners record their sandboxes.
Dir string
Logger *slog.Logger
}
Options configures a Manager.