Documentation
¶
Overview ¶
package fusefile is the canonical authoring format for a fuse environment. a Fusefile is parsed and compiled client-side into the orchestrator wire (CreateEnvironmentRequest); the orchestrator never sees a Fusefile.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiled ¶
type Compiled struct {
Spec ResourceSpec
ManifestJSON []byte
StartupScript string
RequiredSecrets []string
Expose []ExposeSpec
}
Compiled is the result of compiling a Fusefile: the resource spec, the manifest json to upload to the guest, the startup script to run, the secrets the environment needs at create time, and any ports to expose.
type EnvValue ¶
type EnvValue struct {
Value string `yaml:"value,omitempty"`
Secret string `yaml:"secret,omitempty"`
}
EnvValue is either a literal value or a secret reference. exactly one is set.
type ExposeSpec ¶
ExposeSpec requests that a guest port be published as a reachable endpoint. Mirrors Fusefile's Expose entries one-for-one.
type Fusefile ¶
type Fusefile struct {
Version int `yaml:"version"`
Image string `yaml:"image,omitempty"`
Resources Resources `yaml:"resources,omitempty"`
Setup []string `yaml:"setup,omitempty"`
Services map[string]Service `yaml:"services,omitempty"`
Run string `yaml:"run,omitempty"`
Workspace string `yaml:"workspace,omitempty"`
Expose []Expose `yaml:"expose,omitempty"`
Secrets []string `yaml:"secrets,omitempty"`
}
Fusefile is the v1 authoring contract.
type ResourceSpec ¶
type ResourceSpec struct {
CPUs int32
RamMB int32
StorageGB int32
Region string
MaxRuntimeSeconds int64
Image string
GPUs int32
GPUKind string
}
ResourceSpec mirrors internal/api.ResourceSpec field-for-field so the CLI can copy Compiled.Spec into the sdk/api spec without importing the api package.
Image selects the VM's base rootfs at create time (a name resolved by the firecracker host agent to a pre-baked rootfs file; see FUSEFILE_PLAN.md Phase 7). It lives here, not in the manifest json, because rootfs selection happens at Provider.Create — before the guest boots and long before the manifest is ever uploaded to it.
type Resources ¶
type Resources struct {
CPUs int32 `yaml:"cpus,omitempty"`
GPU int `yaml:"gpu,omitempty"` // whole-device count
GPUKind string `yaml:"gpu_kind,omitempty"` // optional match, e.g. "a100"
Memory string `yaml:"memory,omitempty"` // e.g. "2GB"
Storage string `yaml:"storage,omitempty"` // e.g. "10GB"
MaxRuntime string `yaml:"max_runtime,omitempty"` // go duration
}
Resources is the human-friendly hardware spec; compiled to ResourceSpec.