Documentation
¶
Overview ¶
Package workertype contains the design-time Worker Type manifest contract from ADR-0207. Manifests describe package identity, compatibility, authoring metadata and executable artifact identity; they do not execute Worker code or participate in runtime job processing.
Package workertype defines the declarative Worker Type package contract from ADR-0207. It is design-time metadata: parsing and validation must never run in the processor hot path.
Index ¶
Constants ¶
const ( // APIVersionV1Alpha1 is the first Worker Type manifest schema version. APIVersionV1Alpha1 = "atlas.io/v1alpha1" // KindWorkerType identifies a Worker Type manifest. KindWorkerType = "WorkerType" // WorkerProtocolV1 is the first public Worker protocol version supported by manifests. WorkerProtocolV1 = "v1" // RuntimeExternal describes a separately packaged Worker runtime. RuntimeExternal = "external" // RuntimeBundled describes a Worker runtime shipped as part of Atlas. RuntimeBundled = "bundled" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct {
Platform string `json:"platform"`
MediaType string `json:"mediaType"`
Digest string `json:"digest"`
}
Artifact identifies an executable runtime artifact by content digest.
type Manifest ¶
type Manifest struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata Metadata `json:"metadata"`
Spec Spec `json:"spec"`
}
Manifest is a versioned declarative Worker Type package description.
func ParseJSON ¶
ParseJSON decodes and validates one Worker Type manifest. Unknown fields are rejected so package authors cannot believe Atlas is enforcing metadata it has silently ignored.
func (Manifest) CompatibleWith ¶
CompatibleWith reports whether an Atlas semantic version satisfies the manifest's declared compatibility conjunction.
type Metadata ¶
type Metadata struct {
ID string `json:"id"`
Version string `json:"version"`
Name string `json:"name"`
}
Metadata is the stable package identity plus presentation name.
type Runtime ¶
type Runtime struct {
Mode string `json:"mode"`
}
Runtime declares how the Worker runtime is supplied.
type Spec ¶
type Spec struct {
AtlasCompatibility string `json:"atlasCompatibility"`
WorkerProtocol string `json:"workerProtocol"`
Runtime Runtime `json:"runtime"`
JobTypes []string `json:"jobTypes"`
Operations []Operation `json:"operations"`
ConfigurationSchema string `json:"configurationSchema"`
ModelerTemplate string `json:"modelerTemplate"`
Artifact *Artifact `json:"artifact,omitempty"`
}
Spec describes compatibility, authoring metadata and runtime packaging.