workertype

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

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

View Source
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

func ParseJSON(data []byte) (Manifest, error)

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

func (m Manifest) CompatibleWith(atlasVersion string) (bool, error)

CompatibleWith reports whether an Atlas semantic version satisfies the manifest's declared compatibility conjunction.

func (Manifest) Validate

func (m Manifest) Validate() error

Validate checks the static Worker Type package contract without executing any package content or resolving runtime configuration.

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 Operation

type Operation struct {
	ID      string `json:"id"`
	JobType string `json:"jobType"`
}

Operation is one authorable operation implemented by a declared job type.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL