Documentation
¶
Overview ¶
Package builds implements a secure build system that runs rootless BuildKit inside ephemeral Cloud Hypervisor microVMs for multi-tenant isolation.
Index ¶
- Constants
- Variables
- func ExtractDockerfileFromTarball(tarballPath string) (string, error)
- func GetCacheKeyFromConfig(registryURL, cacheScope, runtime string, lockfileHashes map[string]string) (importArg, exportArg string, err error)
- func ParseDockerfileFROMs(content string) []string
- func ValidateCacheScope(scope string) error
- type Build
- type BuildConfig
- type BuildEvent
- type BuildPolicy
- type BuildProvenance
- type BuildQueue
- func (q *BuildQueue) ActiveBuildForSerialKey(serialKey string) *string
- func (q *BuildQueue) ActiveCount() int
- func (q *BuildQueue) Cancel(buildID string, persist func() error) (bool, error)
- func (q *BuildQueue) Enqueue(buildID string, req CreateBuildRequest, startFn func()) int
- func (q *BuildQueue) EnqueueSerial(buildID string, req CreateBuildRequest, serialKey string, startFn func()) int
- func (q *BuildQueue) GetPosition(buildID string) *int
- func (q *BuildQueue) HasSerialKey(serialKey string) bool
- func (q *BuildQueue) IsActive(buildID string) bool
- func (q *BuildQueue) MarkComplete(buildID string)
- func (q *BuildQueue) PendingBuildsForSerialKey(serialKey string) []string
- func (q *BuildQueue) PendingCount() int
- func (q *BuildQueue) QueueLength() int
- func (q *BuildQueue) ReleaseSerialKey(buildID string)
- type BuildResult
- type CacheKey
- type CacheKeyGenerator
- type Config
- type CreateBuildRequest
- type FileSecretProvider
- type Manager
- type Metrics
- type NoOpSecretProvider
- type QueuedBuild
- type RegistryTokenClaims
- type RegistryTokenGenerator
- type RepoPermission
- type SecretProvider
- type SecretRef
- type SecretsRequest
- type SecretsResponse
- type VsockMessage
Constants ¶
const ( StatusQueued = "queued" StatusBuilding = "building" StatusPushing = "pushing" StatusReady = "ready" StatusFailed = "failed" StatusCancelled = "cancelled" )
Build status constants
const ( EventTypeLog = "log" EventTypeStatus = "status" EventTypeHeartbeat = "heartbeat" )
BuildEvent type constants
const ( // MaxBuildCPUs is the maximum number of vCPUs for a builder VM MaxBuildCPUs = 8 // MaxBuildMemoryMB is the maximum memory in MB for a builder VM (16GB) MaxBuildMemoryMB = 16384 )
const ( // BuildAgentVsockPort is the port the builder agent listens on inside the guest BuildAgentVsockPort = 5001 // SecretsVsockPort is the port the host listens on for secret requests from builder agents SecretsVsockPort = 5002 )
Variables ¶
var ( // ErrNotFound is returned when a build is not found ErrNotFound = errors.New("build not found") // ErrAlreadyExists is returned when a build with the same ID already exists ErrAlreadyExists = errors.New("build already exists") // ErrDockerfileRequired is returned when no Dockerfile is provided ErrDockerfileRequired = errors.New("dockerfile required: provide dockerfile parameter or include Dockerfile in source tarball") // ErrBuildFailed is returned when a build fails ErrBuildFailed = errors.New("build failed") // ErrBuildTimeout is returned when a build exceeds its timeout ErrBuildTimeout = errors.New("build timeout") // ErrBuildCancelled is returned when a build is cancelled ErrBuildCancelled = errors.New("build cancelled") // ErrInvalidSource is returned when the source tarball is invalid ErrInvalidSource = errors.New("invalid source") // ErrSourceHashMismatch is returned when the source hash doesn't match ErrSourceHashMismatch = errors.New("source hash mismatch") // ErrBuilderNotReady is returned when the builder image is not available ErrBuilderNotReady = errors.New("builder image not ready") // ErrBuildInProgress is returned when trying to cancel a build that's already complete ErrBuildInProgress = errors.New("build in progress") )
var NewRegistryTokenGenerator = registrytoken.NewGenerator
Functions ¶
func ExtractDockerfileFromTarball ¶ added in v0.0.6
ExtractDockerfileFromTarball reads just the Dockerfile entry from a .tar.gz archive and returns its content as a string. It looks for entries named "Dockerfile" or "./Dockerfile" at the root of the archive.
func GetCacheKeyFromConfig ¶
func GetCacheKeyFromConfig(registryURL, cacheScope, runtime string, lockfileHashes map[string]string) (importArg, exportArg string, err error)
GetCacheKeyFromConfig extracts cache configuration for the builder agent
func ParseDockerfileFROMs ¶ added in v0.0.6
ParseDockerfileFROMs extracts and deduplicates base image references from Dockerfile content. It reuses the same parsing logic as the builder agent's rewriteDockerfileFROMs: split lines, find FROM, skip flags/comments/scratch, normalize refs. Inter-stage references (FROM builder) and variable references (${VAR}) are skipped since they can't be resolved at parse time.
func ValidateCacheScope ¶
ValidateCacheScope validates that a cache scope is safe to use
Types ¶
type Build ¶
type Build struct {
ID string `json:"id"`
Status string `json:"status"`
Tags tags.Tags `json:"tags,omitempty"`
QueuePosition *int `json:"queue_position,omitempty"`
ImageDigest *string `json:"image_digest,omitempty"`
ImageRef *string `json:"image_ref,omitempty"`
Error *string `json:"error,omitempty"`
Provenance *BuildProvenance `json:"provenance,omitempty"`
CreatedAt time.Time `json:"created_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
DurationMS *int64 `json:"duration_ms,omitempty"`
BuilderInstanceID *string `json:"builder_instance_id,omitempty"`
BuilderID *string `json:"builder_id,omitempty"`
}
Build represents a source-to-image build job
type BuildConfig ¶
type BuildConfig struct {
// JobID is the build job identifier
JobID string `json:"job_id"`
// Dockerfile content (if not provided in source tarball)
Dockerfile string `json:"dockerfile,omitempty"`
// BaseImageDigest optionally pins the base image
BaseImageDigest string `json:"base_image_digest,omitempty"`
// RegistryURL is where to push the built image
RegistryURL string `json:"registry_url"`
// RegistryToken is a short-lived JWT granting push access to specific repositories.
// The builder agent uses this token to authenticate with the registry.
RegistryToken string `json:"registry_token,omitempty"`
// RegistryInsecure skips TLS verification for the registry (for self-signed certs)
RegistryInsecure bool `json:"registry_insecure,omitempty"`
// RegistryCACert is the PEM-encoded CA certificate for verifying the registry's TLS cert
RegistryCACert string `json:"registry_ca_cert,omitempty"`
// CacheScope is the tenant-specific cache key prefix
CacheScope string `json:"cache_scope,omitempty"`
// SourcePath is the path to source in the guest (typically /src)
SourcePath string `json:"source_path"`
// BuildArgs are ARG values for the Dockerfile
BuildArgs map[string]string `json:"build_args,omitempty"`
// Secrets are secret references to fetch from host
Secrets []SecretRef `json:"secrets,omitempty"`
// TimeoutSeconds is the build timeout
TimeoutSeconds int `json:"timeout_seconds"`
// NetworkMode is "isolated" or "egress"
NetworkMode string `json:"network_mode"`
// IsAdminBuild indicates this is an admin build with push access to global cache
IsAdminBuild bool `json:"is_admin_build,omitempty"`
// GlobalCacheKey is the global cache identifier (e.g., "node", "python", "ubuntu", "browser")
GlobalCacheKey string `json:"global_cache_key,omitempty"`
// ImageName optionally sets a custom image name for the build output.
ImageName string `json:"image_name,omitempty"`
// CacheGCReservedBytes and CacheGCMaxUsedBytes bound BuildKit's garbage
// collector when the build root is a fixed-size persistent disk. The host
// leaves both zero for tmpfs-backed builds.
CacheGCReservedBytes int64 `json:"cache_gc_reserved_bytes,omitempty"`
CacheGCMaxUsedBytes int64 `json:"cache_gc_max_used_bytes,omitempty"`
}
BuildConfig is the configuration passed to the builder VM via config disk This is read by the builder agent inside the guest
type BuildEvent ¶
type BuildEvent struct {
// Type is one of "log", "status", or "heartbeat"
Type string `json:"type"`
// Timestamp is when the event occurred
Timestamp time.Time `json:"timestamp"`
// Content is the log line content (only for type="log")
Content string `json:"content,omitempty"`
// Status is the new build status (only for type="status")
Status string `json:"status,omitempty"`
}
BuildEvent represents a typed SSE event for build streaming
type BuildPolicy ¶
type BuildPolicy struct {
// TimeoutSeconds is the maximum build duration (default: 600)
TimeoutSeconds int `json:"timeout_seconds,omitempty"`
// MemoryMB is the memory limit for the builder VM (default: 2048)
MemoryMB int `json:"memory_mb,omitempty"`
// CPUs is the number of vCPUs for the builder VM (default: 2)
CPUs int `json:"cpus,omitempty"`
// NetworkMode controls network access during build
// "isolated" = no network, "egress" = outbound allowed
NetworkMode string `json:"network_mode,omitempty"`
// AllowedDomains restricts egress to specific domains (only when NetworkMode="egress")
AllowedDomains []string `json:"allowed_domains,omitempty"`
}
BuildPolicy defines resource limits and network policy for a build
func DefaultBuildPolicy ¶
func DefaultBuildPolicy() BuildPolicy
DefaultBuildPolicy returns the default build policy
func (*BuildPolicy) ApplyDefaults ¶
func (p *BuildPolicy) ApplyDefaults()
ApplyDefaults fills in default values for a build policy
func (*BuildPolicy) Validate ¶ added in v0.0.7
func (p *BuildPolicy) Validate() error
Validate checks that the build policy values are within allowed limits. Returns an error if any value exceeds the maximum.
type BuildProvenance ¶
type BuildProvenance struct {
// BaseImageDigest is the pinned base image used
BaseImageDigest string `json:"base_image_digest"`
// SourceHash is the SHA256 of the source tarball
SourceHash string `json:"source_hash"`
// LockfileHashes maps lockfile names to their SHA256 hashes
LockfileHashes map[string]string `json:"lockfile_hashes,omitempty"`
// BuildkitVersion is the BuildKit version used
BuildkitVersion string `json:"buildkit_version,omitempty"`
// Timestamp is when the build completed
Timestamp time.Time `json:"timestamp"`
}
BuildProvenance records the inputs and toolchain used for a build This enables reproducibility verification and audit trails
type BuildQueue ¶
type BuildQueue struct {
// contains filtered or unexported fields
}
BuildQueue manages concurrent builds with a configurable limit. Following the pattern from lib/images/queue.go.
Design notes (see plan for full context): - Queue state is in-memory (lost on restart) - Build metadata is persisted to disk - On startup, pending builds are recovered via listPendingBuilds()
Future migration path if needed: - Add BuildQueue interface with Enqueue/Dequeue/Ack/Nack - Implement adapters: memoryQueue, redisQueue, natsQueue - Use BUILD_QUEUE_BACKEND env var to select implementation
func NewBuildQueue ¶
func NewBuildQueue(maxConcurrent int) *BuildQueue
NewBuildQueue creates a new build queue with the given concurrency limit
func (*BuildQueue) ActiveBuildForSerialKey ¶ added in v0.3.0
func (q *BuildQueue) ActiveBuildForSerialKey(serialKey string) *string
ActiveBuildForSerialKey returns the ID of the active build holding serialKey, or nil when no active build holds it.
func (*BuildQueue) ActiveCount ¶
func (q *BuildQueue) ActiveCount() int
ActiveCount returns the number of actively building builds
func (*BuildQueue) Cancel ¶
func (q *BuildQueue) Cancel(buildID string, persist func() error) (bool, error)
Cancel removes a build from the pending queue. Returns true if the build was cancelled, false if it was not in the queue (already running or not found). persist, if set, runs under the queue lock before removal; on failure the build remains queued. It must not call back into the queue.
func (*BuildQueue) Enqueue ¶
func (q *BuildQueue) Enqueue(buildID string, req CreateBuildRequest, startFn func()) int
Enqueue adds a build to the queue. Returns queue position (0 if started immediately, >0 if queued among pending builds that can currently start). If the build is already building or queued, returns its current position without re-enqueueing.
func (*BuildQueue) EnqueueSerial ¶ added in v0.3.0
func (q *BuildQueue) EnqueueSerial(buildID string, req CreateBuildRequest, serialKey string, startFn func()) int
EnqueueSerial is Enqueue with a serial key: builds sharing a non-empty key are serialized so a waiting build stays pending instead of occupying a concurrency slot while blocked on another build of its group.
func (*BuildQueue) GetPosition ¶
func (q *BuildQueue) GetPosition(buildID string) *int
GetPosition returns the queue position for a build. Returns nil if the build is actively running or not in queue.
func (*BuildQueue) HasSerialKey ¶ added in v0.3.0
func (q *BuildQueue) HasSerialKey(serialKey string) bool
HasSerialKey reports whether an active or pending build uses serialKey. Both states are inspected under one lock so pending-to-active transitions cannot briefly appear idle to lifecycle guards.
func (*BuildQueue) IsActive ¶
func (q *BuildQueue) IsActive(buildID string) bool
IsActive returns true if the build is actively running
func (*BuildQueue) MarkComplete ¶
func (q *BuildQueue) MarkComplete(buildID string)
MarkComplete marks a build as complete and starts pending builds while capacity and serial keys allow. A pending build whose serial key is held is skipped so later builds can proceed.
func (*BuildQueue) PendingBuildsForSerialKey ¶ added in v0.3.0
func (q *BuildQueue) PendingBuildsForSerialKey(serialKey string) []string
PendingBuildsForSerialKey returns the IDs of pending builds with serialKey, oldest first.
func (*BuildQueue) PendingCount ¶
func (q *BuildQueue) PendingCount() int
PendingCount returns the number of queued builds
func (*BuildQueue) QueueLength ¶
func (q *BuildQueue) QueueLength() int
QueueLength returns the total number of builds (active + pending)
func (*BuildQueue) ReleaseSerialKey ¶ added in v0.3.0
func (q *BuildQueue) ReleaseSerialKey(buildID string)
ReleaseSerialKey frees the serial key held by an active build without marking it complete, so a same-key pending build can start once the active build no longer needs exclusivity (after it releases the builder disk but before it finishes post-build work). The successor starts even when every global slot is taken: the releasing build is past its exclusive phase, so serialized builds would otherwise never overlap at MaxConcurrentBuilds=1.
type BuildResult ¶
type BuildResult struct {
// Success indicates whether the build succeeded
Success bool `json:"success"`
// ImageDigest is the digest of the pushed image (only on success)
ImageDigest string `json:"image_digest,omitempty"`
// Error is the error message (only on failure)
Error string `json:"error,omitempty"`
// Logs is the full build log output
Logs string `json:"logs,omitempty"`
// Provenance records build inputs for reproducibility
Provenance BuildProvenance `json:"provenance"`
// DurationMS is the build duration in milliseconds
DurationMS int64 `json:"duration_ms"`
}
BuildResult is returned by the builder agent after a build completes
type CacheKey ¶
type CacheKey struct {
// Full reference for BuildKit --import-cache / --export-cache
Reference string
// Components
TenantScope string
Runtime string
LockfileHash string
}
CacheKey represents a validated cache key
func (*CacheKey) ExportCacheArg ¶
ExportCacheArg returns the BuildKit --export-cache argument Uses image-manifest=true to ensure layer blobs are stored in the cache image rather than as external references, enabling cache hits in ephemeral BuildKit instances.
func (*CacheKey) ImportCacheArg ¶
ImportCacheArg returns the BuildKit --import-cache argument
type CacheKeyGenerator ¶
type CacheKeyGenerator struct {
// contains filtered or unexported fields
}
CacheKeyGenerator generates cache keys for builds with tenant isolation
func NewCacheKeyGenerator ¶
func NewCacheKeyGenerator(registryURL string) *CacheKeyGenerator
NewCacheKeyGenerator creates a new cache key generator
func (*CacheKeyGenerator) GenerateCacheKey ¶
func (g *CacheKeyGenerator) GenerateCacheKey(tenantScope, runtime string, lockfileHashes map[string]string) (*CacheKey, error)
GenerateCacheKey generates a cache key for a build.
Cache key structure:
{registry}/cache/{tenant_scope}/{runtime}/{lockfile_hash}
This structure provides: - Tenant isolation: each tenant's cache is isolated by scope - Runtime separation: Node.js and Python caches don't mix - Lockfile-based keying: same lockfile = cache hit
type Config ¶
type Config struct {
// MaxConcurrentBuilds is the maximum number of concurrent builds
MaxConcurrentBuilds int
// BuilderImage is the OCI image to use for builder VMs
// This should contain rootless BuildKit and the builder agent
BuilderImage string
// RegistryURL is the URL of the registry to push built images to
RegistryURL string
// RegistryInsecure skips TLS verification for the registry (for self-signed certs)
RegistryInsecure bool
// RegistryCACert is the PEM-encoded CA certificate for verifying the registry's TLS cert
// If set, this is passed to the builder VM to enable TLS verification
RegistryCACert string
// DefaultTimeout is the default build timeout in seconds
DefaultTimeout int
// RegistrySecret is the secret used to sign registry access tokens
// This should be the same secret used by the registry middleware
RegistrySecret string
// DockerSocket is the path to the Docker socket for building the builder image
DockerSocket string
// Retention is how long a finished build's metadata and logs are kept.
// Its source is deleted as soon as the build finishes.
Retention time.Duration
}
Config holds configuration for the build manager
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default build manager configuration
type CreateBuildRequest ¶
type CreateBuildRequest struct {
// Dockerfile content. Required if not included in the source tarball.
// The Dockerfile specifies the runtime (e.g., FROM node:20-alpine).
Dockerfile string `json:"dockerfile,omitempty"`
// BaseImageDigest optionally pins the base image by digest for reproducibility
BaseImageDigest string `json:"base_image_digest,omitempty"`
// SourceHash is the SHA256 hash of the source tarball for verification
SourceHash string `json:"source_hash,omitempty"`
// BuildPolicy contains resource limits and network policy for the build
BuildPolicy *BuildPolicy `json:"build_policy,omitempty"`
// CacheScope is the tenant-specific cache key prefix for isolation
CacheScope string `json:"cache_scope,omitempty"`
// BuildArgs are ARG values to pass to the Dockerfile
BuildArgs map[string]string `json:"build_args,omitempty"`
// Secrets are secret references to inject during build
Secrets []SecretRef `json:"secrets,omitempty"`
// IsAdminBuild grants push access to global cache (operator-only).
// Regular tenant builds only get pull access to global cache.
IsAdminBuild bool `json:"is_admin_build,omitempty"`
// GlobalCacheKey is the global cache identifier (e.g., "node", "python", "ubuntu", "browser").
// Used with IsAdminBuild to target cache/global/{key}.
// Regular builds import from cache/global/{key} with pull-only access.
GlobalCacheKey string `json:"global_cache_key,omitempty"`
// ImageName optionally sets a custom image name for the build output.
// When set, the image is pushed to {registry}/{image_name} instead of {registry}/builds/{id}.
ImageName string `json:"image_name,omitempty"`
// Tags are optional user-defined key-value tags for the build resource.
Tags tags.Tags `json:"tags,omitempty"`
// BuilderID optionally selects the Builder whose persistent cache disk
// backs this build. It is the only builder selector. When empty, the
// build uses an ephemeral tmpfs BuildKit root.
BuilderID string `json:"builder_id,omitempty"`
}
CreateBuildRequest represents a request to create a new build
type FileSecretProvider ¶
type FileSecretProvider struct {
// contains filtered or unexported fields
}
FileSecretProvider reads secrets from files in a directory. Each secret is stored as a file named by its ID, with the secret value as the file content. Example: /etc/hypeman/secrets/npm_token contains the npm token value.
func NewFileSecretProvider ¶
func NewFileSecretProvider(secretsDir string) *FileSecretProvider
NewFileSecretProvider creates a new file-based secret provider. secretsDir is the directory containing secret files (e.g., /etc/hypeman/secrets/).
func (*FileSecretProvider) GetSecrets ¶
func (p *FileSecretProvider) GetSecrets(ctx context.Context, secretIDs []string) (map[string]string, error)
GetSecrets returns the values for the given secret IDs by reading files from the secrets directory. Missing secrets are silently skipped (not an error). Returns an error only if a secret file exists but cannot be read.
type Manager ¶
type Manager interface {
// Start starts the build manager's background services (vsock handler, etc.)
// This should be called once when the API server starts.
Start(ctx context.Context) error
// CreateBuild starts a new build job
CreateBuild(ctx context.Context, req CreateBuildRequest, sourceData []byte) (*Build, error)
// GetBuild returns a build by ID
GetBuild(ctx context.Context, id string) (*Build, error)
// ListBuilds returns all builds
ListBuilds(ctx context.Context) ([]*Build, error)
// CancelBuild cancels a pending or running build
CancelBuild(ctx context.Context, id string) error
// GetBuildLogs returns the logs for a build
GetBuildLogs(ctx context.Context, id string) ([]byte, error)
// StreamBuildEvents streams build events (logs, status changes, heartbeats)
// With follow=false, returns existing logs then closes
// With follow=true, continues streaming until build completes or context cancels
StreamBuildEvents(ctx context.Context, id string, follow bool) (<-chan BuildEvent, error)
// RecoverPendingBuilds recovers builds that were interrupted on restart
RecoverPendingBuilds()
// ActiveBuildForBuilder returns the ID of the build currently running on
// a builder, or nil when no build is running on it.
ActiveBuildForBuilder(builderID string) *string
// QueuedBuildsForBuilder returns the IDs of pending builds targeting a
// builder, oldest first.
QueuedBuildsForBuilder(builderID string) []string
// BuilderHasBuilds reports whether any build targeting the builder is
// queued or running, including builds still only persisted on disk
// while startup recovery has not re-enqueued them yet.
BuilderHasBuilds(builderID string) bool
// ReadyForBuilds reports whether startup builder-image preparation has finished.
ReadyForBuilds() bool
}
Manager interface for the build system
func NewManager ¶
func NewManager( p *paths.Paths, config Config, instanceMgr instances.Manager, volumeMgr volumes.Manager, builderMgr builders.Manager, imageMgr images.Manager, secretProvider SecretProvider, logger *slog.Logger, meter metric.Meter, ) (Manager, error)
NewManager creates a new build manager
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics provides Prometheus metrics for the build system
func NewMetrics ¶
NewMetrics creates a new Metrics instance
func (*Metrics) RecordBuild ¶
RecordBuild records metrics for a completed build
func (*Metrics) RegisterQueueCallbacks ¶
func (m *Metrics) RegisterQueueCallbacks(queue *BuildQueue, meter metric.Meter) error
RegisterQueueCallbacks registers callbacks for queue metrics
type NoOpSecretProvider ¶
type NoOpSecretProvider struct{}
NoOpSecretProvider returns empty secrets (for builds without secrets)
func (*NoOpSecretProvider) GetSecrets ¶
type QueuedBuild ¶
type QueuedBuild struct {
BuildID string
Request CreateBuildRequest
// SerialKey groups builds that must not run concurrently (builds
// sharing a builder disk). A queued build with a serial key only starts
// once no active build holds the same key, so it never occupies a
// concurrency slot while waiting on another build of its group.
SerialKey string
StartFn func()
}
QueuedBuild represents a build waiting to be executed
type RegistryTokenClaims ¶
type RegistryTokenClaims = registrytoken.Claims
Registry tokens are minted by lib/registrytoken, which image publication uses without the rest of this package.
type RegistryTokenGenerator ¶
type RegistryTokenGenerator = registrytoken.Generator
Registry tokens are minted by lib/registrytoken, which image publication uses without the rest of this package.
type RepoPermission ¶ added in v0.0.6
type RepoPermission = registrytoken.RepoPermission
Registry tokens are minted by lib/registrytoken, which image publication uses without the rest of this package.
type SecretProvider ¶
type SecretProvider interface {
// GetSecrets returns the values for the given secret IDs
GetSecrets(ctx context.Context, secretIDs []string) (map[string]string, error)
}
SecretProvider provides secrets for builds
type SecretRef ¶
type SecretRef struct {
// ID is the secret identifier (used in --mount=type=secret,id=...)
ID string `json:"id"`
// EnvVar is the environment variable name to expose the secret as
EnvVar string `json:"env_var,omitempty"`
}
SecretRef references a secret to inject during build
type SecretsRequest ¶
type SecretsRequest struct {
SecretIDs []string `json:"secret_ids"`
}
SecretsRequest is sent by the builder agent to fetch secrets
type SecretsResponse ¶
SecretsResponse contains the requested secrets
type VsockMessage ¶
type VsockMessage struct {
Type string `json:"type"`
Result *BuildResult `json:"result,omitempty"`
Log string `json:"log,omitempty"`
SecretIDs []string `json:"secret_ids,omitempty"` // For secrets request
Secrets map[string]string `json:"secrets,omitempty"` // For secrets response
}
VsockMessage is the envelope for vsock communication with builder agents
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package main implements the builder agent that runs inside builder microVMs.
|
Package main implements the builder agent that runs inside builder microVMs. |