bundlev1

package
v1.0.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package bundlev1 defines the interfaces and types need to be an Airflow Dag Bundle

The main entry point should call bundlev1server/Serve.

Package bundlev1 defines the types and interfaces needed to implement v1 of the Bundle Plugin

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle = worker.Bundle

type BundleInfo

type BundleInfo = api.BundleInfo

BundleInfo Schema for telling task which bundle to run with.

type BundleProvider

type BundleProvider interface {
	// GetBundleVersion returns upfront information about the bundle name and version without needing to load
	// the full dag and task information, which could be memory intensive.
	GetBundleVersion() BundleInfo

	// RegisterDags is called to populate the Task functions in the registry in order to execute them.
	//
	// You should populate all dags and tasks in the bundle.
	//
	// This will be called once-per-process-per-bundle and cached internally. You do not have to cache this
	// yourself
	RegisterDags(Registry) error
}

type Dag

type Dag interface {
	AddTask(fn any)
	AddTaskWithName(taskId string, fn any)
}

type ExecuteTaskWorkload

type ExecuteTaskWorkload struct {
	Token string `json:"token"`

	TI         api.TaskInstance `json:"ti"`
	BundleInfo api.BundleInfo   `json:"bundle_info"`
	LogPath    *string          `json:"log_path,omitempty"`
}

type GetMetadataResponse

type GetMetadataResponse struct {
	Bundle BundleInfo
}

type Registry

type Registry interface {
	Bundle
	AddDag(dagId string) Dag
}

Registry defines the interface that lets user code add dags and tasks, and extends Bundle for execution time

func New

func New() Registry

Function New creates a new bundle on which Dag and Tasks can be registered

type Task

type Task = worker.Task

func NewTaskFunction

func NewTaskFunction(fn any) (Task, error)

type TaskInstance

type TaskInstance = api.TaskInstance

Directories

Path Synopsis
Package bundlev1client implements the worker-side Client to speak to Dag bundles compiled with the github.com/apache/airflow/go-sdk/bundle/bundlev1/bundlev1server package.
Package bundlev1client implements the worker-side Client to speak to Dag bundles compiled with the github.com/apache/airflow/go-sdk/bundle/bundlev1/bundlev1server package.
Package bundlev1server implements a server implementation to run bundlev1 as gRPC servers, making it accessible to the Airflow Go Workers.
Package bundlev1server implements a server implementation to run bundlev1 as gRPC servers, making it accessible to the Airflow Go Workers.
impl
Package impl contains internal GPRC implementation types.
Package impl contains internal GPRC implementation types.

Jump to

Keyboard shortcuts

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