Enable exec functions (Alpha)

This commit is contained in:
Phillip Wittrock
2020-05-05 07:47:08 -07:00
parent 174b2ed62e
commit 95f0a44fc0
4 changed files with 80 additions and 25 deletions

View File

@@ -30,10 +30,19 @@ type FunctionSpec struct {
// Starlark is the spec for running a function as a starlark script
Starlark StarlarkSpec `json:"starlark,omitempty" yaml:"starlark,omitempty"`
// ExecSpec is the spec for running a function as an executable
Exec ExecSpec `json:"exec,omitempty" yaml:"exec,omitempty"`
// Mounts are the storage or directories to mount into the container
StorageMounts []StorageMount `json:"mounts,omitempty" yaml:"mounts,omitempty"`
}
type ExecSpec struct {
Path string `json:"path,omitempty" yaml:"path,omitempty"`
Args []string `json:"args,omitempty" yaml:"args,omitempty"`
}
// ContainerSpec defines a spec for running a function as a container
type ContainerSpec struct {
// Image is the container image to run