pipelines

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

The Delta Live Tables API allows you to create, edit, delete, start, and view details about pipelines.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatePipeline

type CreatePipeline struct {
	// If false, deployment will fail if name conflicts with that of another
	// pipeline.
	AllowDuplicateNames bool `json:"allow_duplicate_names,omitempty"`
	// A catalog in Unity Catalog to publish data from this pipeline to. If
	// `target` is specified, tables in this pipeline are published to a
	// `target` schema inside `catalog` (for example,
	// `catalog`.`target`.`table`). If `target` is not specified, no data is
	// published to Unity Catalog.
	Catalog string `json:"catalog,omitempty"`
	// DLT Release Channel that specifies which version to use.
	Channel string `json:"channel,omitempty"`
	// Cluster settings for this pipeline deployment.
	Clusters []PipelineCluster `json:"clusters,omitempty"`
	// String-String configuration for this pipeline execution.
	Configuration map[string]string `json:"configuration,omitempty"`
	// Whether the pipeline is continuous or triggered. This replaces `trigger`.
	Continuous bool `json:"continuous,omitempty"`
	// Whether the pipeline is in Development mode. Defaults to false.
	Development bool `json:"development,omitempty"`

	DryRun bool `json:"dry_run,omitempty"`
	// Pipeline product edition.
	Edition string `json:"edition,omitempty"`
	// Filters on which Pipeline packages to include in the deployed graph.
	Filters *Filters `json:"filters,omitempty"`
	// Unique identifier for this pipeline.
	Id string `json:"id,omitempty"`
	// Libraries or code needed by this deployment.
	Libraries []PipelineLibrary `json:"libraries,omitempty"`
	// Friendly identifier for this pipeline.
	Name string `json:"name,omitempty"`
	// Whether Photon is enabled for this pipeline.
	Photon bool `json:"photon,omitempty"`
	// Whether serverless compute is enabled for this pipeline.
	Serverless bool `json:"serverless,omitempty"`
	// DBFS root directory for storing checkpoints and tables.
	Storage string `json:"storage,omitempty"`
	// Target schema (database) to add tables in this pipeline to. If not
	// specified, no data is published to the Hive metastore or Unity Catalog.
	// To publish to Unity Catalog, also specify `catalog`.
	Target string `json:"target,omitempty"`
	// Which pipeline trigger to use. Deprecated: Use `continuous` instead.
	Trigger *PipelineTrigger `json:"trigger,omitempty"`
}

type CreatePipelineResponse

type CreatePipelineResponse struct {
	// Only returned when dry_run is true.
	EffectiveSettings *PipelineSpec `json:"effective_settings,omitempty"`
	// The unique identifier for the newly created pipeline. Only returned when
	// dry_run is false.
	PipelineId string `json:"pipeline_id,omitempty"`
}

type CronTrigger

type CronTrigger struct {
	QuartzCronSchedule string `json:"quartz_cron_schedule,omitempty"`

	TimezoneId string `json:"timezone_id,omitempty"`
}

type DataPlaneId

type DataPlaneId struct {
	// The instance name of the data plane emitting an event.
	Instance string `json:"instance,omitempty"`
	// A sequence number, unique and increasing within the data plane instance.
	SeqNo any `json:"seq_no,omitempty"`
}

type DeletePipelineRequest

type DeletePipelineRequest struct {
	PipelineId string `json:"-" url:"-"`
}

Delete a pipeline

type EditPipeline

type EditPipeline struct {
	// If false, deployment will fail if name has changed and conflicts the name
	// of another pipeline.
	AllowDuplicateNames bool `json:"allow_duplicate_names,omitempty"`
	// A catalog in Unity Catalog to publish data from this pipeline to. If
	// `target` is specified, tables in this pipeline are published to a
	// `target` schema inside `catalog` (for example,
	// `catalog`.`target`.`table`). If `target` is not specified, no data is
	// published to Unity Catalog.
	Catalog string `json:"catalog,omitempty"`
	// DLT Release Channel that specifies which version to use.
	Channel string `json:"channel,omitempty"`
	// Cluster settings for this pipeline deployment.
	Clusters []PipelineCluster `json:"clusters,omitempty"`
	// String-String configuration for this pipeline execution.
	Configuration map[string]string `json:"configuration,omitempty"`
	// Whether the pipeline is continuous or triggered. This replaces `trigger`.
	Continuous bool `json:"continuous,omitempty"`
	// Whether the pipeline is in Development mode. Defaults to false.
	Development bool `json:"development,omitempty"`
	// Pipeline product edition.
	Edition string `json:"edition,omitempty"`
	// If present, the last-modified time of the pipeline settings before the
	// edit. If the settings were modified after that time, then the request
	// will fail with a conflict.
	ExpectedLastModified int64 `json:"expected_last_modified,omitempty"`
	// Filters on which Pipeline packages to include in the deployed graph.
	Filters *Filters `json:"filters,omitempty"`
	// Unique identifier for this pipeline.
	Id string `json:"id,omitempty"`
	// Libraries or code needed by this deployment.
	Libraries []PipelineLibrary `json:"libraries,omitempty"`
	// Friendly identifier for this pipeline.
	Name string `json:"name,omitempty"`
	// Whether Photon is enabled for this pipeline.
	Photon bool `json:"photon,omitempty"`
	// Unique identifier for this pipeline.
	PipelineId string `json:"pipeline_id,omitempty" url:"-"`
	// Whether serverless compute is enabled for this pipeline.
	Serverless bool `json:"serverless,omitempty"`
	// DBFS root directory for storing checkpoints and tables.
	Storage string `json:"storage,omitempty"`
	// Target schema (database) to add tables in this pipeline to. If not
	// specified, no data is published to the Hive metastore or Unity Catalog.
	// To publish to Unity Catalog, also specify `catalog`.
	Target string `json:"target,omitempty"`
	// Which pipeline trigger to use. Deprecated: Use `continuous` instead.
	Trigger *PipelineTrigger `json:"trigger,omitempty"`
}

type ErrorDetail

type ErrorDetail struct {
	// The exception thrown for this error, with its chain of cause.
	Exceptions []SerializedException `json:"exceptions,omitempty"`
	// Whether this error is considered fatal, that is, unrecoverable.
	Fatal bool `json:"fatal,omitempty"`
}

type EventLevel

type EventLevel string

The severity level of the event.

const EventLevelError EventLevel = `ERROR`
const EventLevelInfo EventLevel = `INFO`
const EventLevelMetrics EventLevel = `METRICS`
const EventLevelWarn EventLevel = `WARN`

func (*EventLevel) Set

func (f *EventLevel) Set(v string) error

Set raw string value and validate it against allowed values

func (*EventLevel) String

func (f *EventLevel) String() string

String representation for fmt.Print

func (*EventLevel) Type

func (f *EventLevel) Type() string

Type always returns EventLevel to satisfy [pflag.Value] interface

type FileLibrary

type FileLibrary struct {
	// The absolute path of the file.
	Path string `json:"path,omitempty"`
}

type Filters

type Filters struct {
	// Paths to exclude.
	Exclude []string `json:"exclude,omitempty"`
	// Paths to include.
	Include []string `json:"include,omitempty"`
}

type GetPipelineRequest

type GetPipelineRequest struct {
	PipelineId string `json:"-" url:"-"`
}

Get a pipeline

type GetPipelineResponse

type GetPipelineResponse struct {
	// An optional message detailing the cause of the pipeline state.
	Cause string `json:"cause,omitempty"`
	// The ID of the cluster that the pipeline is running on.
	ClusterId string `json:"cluster_id,omitempty"`
	// The username of the pipeline creator.
	CreatorUserName string `json:"creator_user_name,omitempty"`
	// The health of a pipeline.
	Health GetPipelineResponseHealth `json:"health,omitempty"`
	// The last time the pipeline settings were modified or created.
	LastModified int64 `json:"last_modified,omitempty"`
	// Status of the latest updates for the pipeline. Ordered with the newest
	// update first.
	LatestUpdates []UpdateStateInfo `json:"latest_updates,omitempty"`
	// A human friendly identifier for the pipeline, taken from the `spec`.
	Name string `json:"name,omitempty"`
	// The ID of the pipeline.
	PipelineId string `json:"pipeline_id,omitempty"`
	// Username of the user that the pipeline will run on behalf of.
	RunAsUserName string `json:"run_as_user_name,omitempty"`
	// The pipeline specification. This field is not returned when called by
	// `ListPipelines`.
	Spec *PipelineSpec `json:"spec,omitempty"`
	// The pipeline state.
	State PipelineState `json:"state,omitempty"`
}

type GetPipelineResponseHealth

type GetPipelineResponseHealth string

The health of a pipeline.

const GetPipelineResponseHealthHealthy GetPipelineResponseHealth = `HEALTHY`
const GetPipelineResponseHealthUnhealthy GetPipelineResponseHealth = `UNHEALTHY`

func (*GetPipelineResponseHealth) Set

Set raw string value and validate it against allowed values

func (*GetPipelineResponseHealth) String

func (f *GetPipelineResponseHealth) String() string

String representation for fmt.Print

func (*GetPipelineResponseHealth) Type

Type always returns GetPipelineResponseHealth to satisfy [pflag.Value] interface

type GetUpdateRequest

type GetUpdateRequest struct {
	// The ID of the pipeline.
	PipelineId string `json:"-" url:"-"`
	// The ID of the update.
	UpdateId string `json:"-" url:"-"`
}

Get a pipeline update

type GetUpdateResponse

type GetUpdateResponse struct {
	// The current update info.
	Update *UpdateInfo `json:"update,omitempty"`
}

type ListPipelineEventsRequest

type ListPipelineEventsRequest struct {
	// Criteria to select a subset of results, expressed using a SQL-like
	// syntax. The supported filters are: 1. level='INFO' (or WARN or ERROR) 2.
	// level in ('INFO', 'WARN') 3. id='[event-id]' 4. timestamp > 'TIMESTAMP'
	// (or >=,<,<=,=)
	//
	// Composite expressions are supported, for example: level in ('ERROR',
	// 'WARN') AND timestamp> '2021-07-22T06:37:33.083Z'
	Filter string `json:"-" url:"filter,omitempty"`
	// Max number of entries to return in a single page. The system may return
	// fewer than max_results events in a response, even if there are more
	// events available.
	MaxResults int `json:"-" url:"max_results,omitempty"`
	// A string indicating a sort order by timestamp for the results, for
	// example, ["timestamp asc"]. The sort order can be ascending or
	// descending. By default, events are returned in descending order by
	// timestamp.
	OrderBy []string `json:"-" url:"order_by,omitempty"`
	// Page token returned by previous call. This field is mutually exclusive
	// with all fields in this request except max_results. An error is returned
	// if any fields other than max_results are set when this field is set.
	PageToken string `json:"-" url:"page_token,omitempty"`

	PipelineId string `json:"-" url:"-"`
}

List pipeline events

type ListPipelineEventsResponse

type ListPipelineEventsResponse struct {
	// The list of events matching the request criteria.
	Events []PipelineEvent `json:"events,omitempty"`
	// If present, a token to fetch the next page of events.
	NextPageToken string `json:"next_page_token,omitempty"`
	// If present, a token to fetch the previous page of events.
	PrevPageToken string `json:"prev_page_token,omitempty"`
}

type ListPipelinesRequest

type ListPipelinesRequest struct {
	// Select a subset of results based on the specified criteria. The supported
	// filters are:
	//
	// * `notebook='<path>'` to select pipelines that reference the provided
	// notebook path. * `name LIKE '[pattern]'` to select pipelines with a name
	// that matches pattern. Wildcards are supported, for example: `name LIKE
	// '%shopping%'`
	//
	// Composite filters are not supported. This field is optional.
	Filter string `json:"-" url:"filter,omitempty"`
	// The maximum number of entries to return in a single page. The system may
	// return fewer than max_results events in a response, even if there are
	// more events available. This field is optional. The default value is 25.
	// The maximum value is 100. An error is returned if the value of
	// max_results is greater than 100.
	MaxResults int `json:"-" url:"max_results,omitempty"`
	// A list of strings specifying the order of results. Supported order_by
	// fields are id and name. The default is id asc. This field is optional.
	OrderBy []string `json:"-" url:"order_by,omitempty"`
	// Page token returned by previous call
	PageToken string `json:"-" url:"page_token,omitempty"`
}

List pipelines

type ListPipelinesResponse

type ListPipelinesResponse struct {
	// If present, a token to fetch the next page of events.
	NextPageToken string `json:"next_page_token,omitempty"`
	// The list of events matching the request criteria.
	Statuses []PipelineStateInfo `json:"statuses,omitempty"`
}

type ListUpdatesRequest

type ListUpdatesRequest struct {
	// Max number of entries to return in a single page.
	MaxResults int `json:"-" url:"max_results,omitempty"`
	// Page token returned by previous call
	PageToken string `json:"-" url:"page_token,omitempty"`
	// The pipeline to return updates for.
	PipelineId string `json:"-" url:"-"`
	// If present, returns updates until and including this update_id.
	UntilUpdateId string `json:"-" url:"until_update_id,omitempty"`
}

List pipeline updates

type ListUpdatesResponse

type ListUpdatesResponse struct {
	// If present, then there are more results, and this a token to be used in a
	// subsequent request to fetch the next page.
	NextPageToken string `json:"next_page_token,omitempty"`
	// If present, then this token can be used in a subsequent request to fetch
	// the previous page.
	PrevPageToken string `json:"prev_page_token,omitempty"`

	Updates []UpdateInfo `json:"updates,omitempty"`
}

type MaturityLevel

type MaturityLevel string

Maturity level for EventDetails.

const MaturityLevelDeprecated MaturityLevel = `DEPRECATED`
const MaturityLevelEvolving MaturityLevel = `EVOLVING`
const MaturityLevelStable MaturityLevel = `STABLE`

func (*MaturityLevel) Set

func (f *MaturityLevel) Set(v string) error

Set raw string value and validate it against allowed values

func (*MaturityLevel) String

func (f *MaturityLevel) String() string

String representation for fmt.Print

func (*MaturityLevel) Type

func (f *MaturityLevel) Type() string

Type always returns MaturityLevel to satisfy [pflag.Value] interface

type NotebookLibrary

type NotebookLibrary struct {
	// The absolute path of the notebook.
	Path string `json:"path,omitempty"`
}

type Origin

type Origin struct {
	// The id of a batch. Unique within a flow.
	BatchId int `json:"batch_id,omitempty"`
	// The cloud provider, e.g., AWS or Azure.
	Cloud string `json:"cloud,omitempty"`
	// The id of the cluster where an execution happens. Unique within a region.
	ClusterId string `json:"cluster_id,omitempty"`
	// The name of a dataset. Unique within a pipeline.
	DatasetName string `json:"dataset_name,omitempty"`
	// The id of the flow. Globally unique. Incremental queries will generally
	// reuse the same id while complete queries will have a new id per update.
	FlowId string `json:"flow_id,omitempty"`
	// The name of the flow. Not unique.
	FlowName string `json:"flow_name,omitempty"`
	// The optional host name where the event was triggered
	Host string `json:"host,omitempty"`
	// The id of a maintenance run. Globally unique.
	MaintenanceId string `json:"maintenance_id,omitempty"`
	// Materialization name.
	MaterializationName string `json:"materialization_name,omitempty"`
	// The org id of the user. Unique within a cloud.
	OrgId int `json:"org_id,omitempty"`
	// The id of the pipeline. Globally unique.
	PipelineId string `json:"pipeline_id,omitempty"`
	// The name of the pipeline. Not unique.
	PipelineName string `json:"pipeline_name,omitempty"`
	// The cloud region.
	Region string `json:"region,omitempty"`
	// The id of the request that caused an update.
	RequestId string `json:"request_id,omitempty"`
	// The id of a (delta) table. Globally unique.
	TableId string `json:"table_id,omitempty"`
	// The Unity Catalog id of the MV or ST being updated.
	UcResourceId string `json:"uc_resource_id,omitempty"`
	// The id of an execution. Globally unique.
	UpdateId string `json:"update_id,omitempty"`
}

type PipelineCluster

type PipelineCluster struct {
	// Note: This field won't be persisted. Only API users will check this
	// field.
	ApplyPolicyDefaultValues bool `json:"apply_policy_default_values,omitempty"`
	// Parameters needed in order to automatically scale clusters up and down
	// based on load. Note: autoscaling works best with DB runtime versions 3.0
	// or later.
	Autoscale *compute.AutoScale `json:"autoscale,omitempty"`
	// Attributes related to clusters running on Amazon Web Services. If not
	// specified at cluster creation, a set of default values will be used.
	AwsAttributes *compute.AwsAttributes `json:"aws_attributes,omitempty"`
	// Attributes related to clusters running on Microsoft Azure. If not
	// specified at cluster creation, a set of default values will be used.
	AzureAttributes *compute.AzureAttributes `json:"azure_attributes,omitempty"`
	// The configuration for delivering spark logs to a long-term storage
	// destination. Only dbfs destinations are supported. Only one destination
	// can be specified for one cluster. If the conf is given, the logs will be
	// delivered to the destination every `5 mins`. The destination of driver
	// logs is `$destination/$clusterId/driver`, while the destination of
	// executor logs is `$destination/$clusterId/executor`.
	ClusterLogConf *compute.ClusterLogConf `json:"cluster_log_conf,omitempty"`
	// Additional tags for cluster resources. Databricks will tag all cluster
	// resources (e.g., AWS instances and EBS volumes) with these tags in
	// addition to `default_tags`. Notes:
	//
	// - Currently, Databricks allows at most 45 custom tags
	//
	// - Clusters can only reuse cloud resources if the resources' tags are a
	// subset of the cluster tags
	CustomTags map[string]string `json:"custom_tags,omitempty"`
	// The optional ID of the instance pool for the driver of the cluster
	// belongs. The pool cluster uses the instance pool with id
	// (instance_pool_id) if the driver pool is not assigned.
	DriverInstancePoolId string `json:"driver_instance_pool_id,omitempty"`
	// The node type of the Spark driver. Note that this field is optional; if
	// unset, the driver node type will be set as the same value as
	// `node_type_id` defined above.
	DriverNodeTypeId string `json:"driver_node_type_id,omitempty"`
	// Attributes related to clusters running on Google Cloud Platform. If not
	// specified at cluster creation, a set of default values will be used.
	GcpAttributes *compute.GcpAttributes `json:"gcp_attributes,omitempty"`
	// The optional ID of the instance pool to which the cluster belongs.
	InstancePoolId string `json:"instance_pool_id,omitempty"`
	// A label for the cluster specification, either `default` to configure the
	// default cluster, or `maintenance` to configure the maintenance cluster.
	// This field is optional. The default value is `default`.
	Label string `json:"label,omitempty"`
	// This field encodes, through a single value, the resources available to
	// each of the Spark nodes in this cluster. For example, the Spark nodes can
	// be provisioned and optimized for memory or compute intensive workloads. A
	// list of available node types can be retrieved by using the
	// :method:clusters/listNodeTypes API call.
	NodeTypeId string `json:"node_type_id,omitempty"`
	// Number of worker nodes that this cluster should have. A cluster has one
	// Spark Driver and `num_workers` Executors for a total of `num_workers` + 1
	// Spark nodes.
	//
	// Note: When reading the properties of a cluster, this field reflects the
	// desired number of workers rather than the actual current number of
	// workers. For instance, if a cluster is resized from 5 to 10 workers, this
	// field will immediately be updated to reflect the target size of 10
	// workers, whereas the workers listed in `spark_info` will gradually
	// increase from 5 to 10 as the new nodes are provisioned.
	NumWorkers int `json:"num_workers,omitempty"`
	// The ID of the cluster policy used to create the cluster if applicable.
	PolicyId string `json:"policy_id,omitempty"`
	// An object containing a set of optional, user-specified Spark
	// configuration key-value pairs. See :method:clusters/create for more
	// details.
	SparkConf map[string]string `json:"spark_conf,omitempty"`
	// An object containing a set of optional, user-specified environment
	// variable key-value pairs. Please note that key-value pair of the form
	// (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the
	// driver and workers.
	//
	// In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we
	// recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the
	// example below. This ensures that all default databricks managed
	// environmental variables are included as well.
	//
	// Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m",
	// "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS":
	// "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}`
	SparkEnvVars map[string]string `json:"spark_env_vars,omitempty"`
	// SSH public key contents that will be added to each Spark node in this
	// cluster. The corresponding private keys can be used to login with the
	// user name `ubuntu` on port `2200`. Up to 10 keys can be specified.
	SshPublicKeys []string `json:"ssh_public_keys,omitempty"`
}

type PipelineEvent

type PipelineEvent struct {
	// Information about an error captured by the event.
	Error *ErrorDetail `json:"error,omitempty"`
	// The event type. Should always correspond to the details
	EventType string `json:"event_type,omitempty"`
	// A time-based, globally unique id.
	Id string `json:"id,omitempty"`
	// The severity level of the event.
	Level EventLevel `json:"level,omitempty"`
	// Maturity level for event_type.
	MaturityLevel MaturityLevel `json:"maturity_level,omitempty"`
	// The display message associated with the event.
	Message string `json:"message,omitempty"`
	// Describes where the event originates from.
	Origin *Origin `json:"origin,omitempty"`
	// A sequencing object to identify and order events.
	Sequence *Sequencing `json:"sequence,omitempty"`
	// The time of the event.
	Timestamp string `json:"timestamp,omitempty"`
}

type PipelineLibrary

type PipelineLibrary struct {
	// The path to a file that defines a pipeline and is stored in the
	// Databricks Repos.
	File *FileLibrary `json:"file,omitempty"`
	// URI of the jar to be installed. Currently only DBFS is supported.
	Jar string `json:"jar,omitempty"`
	// Specification of a maven library to be installed.
	Maven *compute.MavenLibrary `json:"maven,omitempty"`
	// The path to a notebook that defines a pipeline and is stored in the
	// <Databricks> workspace.
	Notebook *NotebookLibrary `json:"notebook,omitempty"`
}

type PipelineSpec

type PipelineSpec struct {
	// A catalog in Unity Catalog to publish data from this pipeline to. If
	// `target` is specified, tables in this pipeline are published to a
	// `target` schema inside `catalog` (for example,
	// `catalog`.`target`.`table`). If `target` is not specified, no data is
	// published to Unity Catalog.
	Catalog string `json:"catalog,omitempty"`
	// DLT Release Channel that specifies which version to use.
	Channel string `json:"channel,omitempty"`
	// Cluster settings for this pipeline deployment.
	Clusters []PipelineCluster `json:"clusters,omitempty"`
	// String-String configuration for this pipeline execution.
	Configuration map[string]string `json:"configuration,omitempty"`
	// Whether the pipeline is continuous or triggered. This replaces `trigger`.
	Continuous bool `json:"continuous,omitempty"`
	// Whether the pipeline is in Development mode. Defaults to false.
	Development bool `json:"development,omitempty"`
	// Pipeline product edition.
	Edition string `json:"edition,omitempty"`
	// Filters on which Pipeline packages to include in the deployed graph.
	Filters *Filters `json:"filters,omitempty"`
	// Unique identifier for this pipeline.
	Id string `json:"id,omitempty"`
	// Libraries or code needed by this deployment.
	Libraries []PipelineLibrary `json:"libraries,omitempty"`
	// Friendly identifier for this pipeline.
	Name string `json:"name,omitempty"`
	// Whether Photon is enabled for this pipeline.
	Photon bool `json:"photon,omitempty"`
	// Whether serverless compute is enabled for this pipeline.
	Serverless bool `json:"serverless,omitempty"`
	// DBFS root directory for storing checkpoints and tables.
	Storage string `json:"storage,omitempty"`
	// Target schema (database) to add tables in this pipeline to. If not
	// specified, no data is published to the Hive metastore or Unity Catalog.
	// To publish to Unity Catalog, also specify `catalog`.
	Target string `json:"target,omitempty"`
	// Which pipeline trigger to use. Deprecated: Use `continuous` instead.
	Trigger *PipelineTrigger `json:"trigger,omitempty"`
}

type PipelineState

type PipelineState string

The pipeline state.

const PipelineStateDeleted PipelineState = `DELETED`
const PipelineStateDeploying PipelineState = `DEPLOYING`
const PipelineStateFailed PipelineState = `FAILED`
const PipelineStateIdle PipelineState = `IDLE`
const PipelineStateRecovering PipelineState = `RECOVERING`
const PipelineStateResetting PipelineState = `RESETTING`
const PipelineStateRunning PipelineState = `RUNNING`
const PipelineStateStarting PipelineState = `STARTING`
const PipelineStateStopping PipelineState = `STOPPING`

func (*PipelineState) Set

func (f *PipelineState) Set(v string) error

Set raw string value and validate it against allowed values

func (*PipelineState) String

func (f *PipelineState) String() string

String representation for fmt.Print

func (*PipelineState) Type

func (f *PipelineState) Type() string

Type always returns PipelineState to satisfy [pflag.Value] interface

type PipelineStateInfo

type PipelineStateInfo struct {
	// The unique identifier of the cluster running the pipeline.
	ClusterId string `json:"cluster_id,omitempty"`
	// The username of the pipeline creator.
	CreatorUserName string `json:"creator_user_name,omitempty"`
	// Status of the latest updates for the pipeline. Ordered with the newest
	// update first.
	LatestUpdates []UpdateStateInfo `json:"latest_updates,omitempty"`
	// The user-friendly name of the pipeline.
	Name string `json:"name,omitempty"`
	// The unique identifier of the pipeline.
	PipelineId string `json:"pipeline_id,omitempty"`
	// The username that the pipeline runs as. This is a read only value derived
	// from the pipeline owner.
	RunAsUserName string `json:"run_as_user_name,omitempty"`
	// The pipeline state.
	State PipelineState `json:"state,omitempty"`
}

type PipelineTrigger

type PipelineTrigger struct {
	Cron *CronTrigger `json:"cron,omitempty"`

	Manual any `json:"manual,omitempty"`
}

type PipelinesAPI

type PipelinesAPI struct {
	// contains filtered or unexported fields
}

The Delta Live Tables API allows you to create, edit, delete, start, and view details about pipelines.

Delta Live Tables is a framework for building reliable, maintainable, and testable data processing pipelines. You define the transformations to perform on your data, and Delta Live Tables manages task orchestration, cluster management, monitoring, data quality, and error handling.

Instead of defining your data pipelines using a series of separate Apache Spark tasks, Delta Live Tables manages how your data is transformed based on a target schema you define for each processing step. You can also enforce data quality with Delta Live Tables expectations. Expectations allow you to define expected data quality and specify how to handle records that fail those expectations.

func NewPipelines

func NewPipelines(client *client.DatabricksClient) *PipelinesAPI

func (*PipelinesAPI) Create

Create a pipeline.

Creates a new data processing pipeline based on the requested configuration. If successful, this method returns the ID of the new pipeline.

Example (Pipelines)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

notebookPath := func() string {
	me, err := w.CurrentUser.Me(ctx)
	if err != nil {
		panic(err)
	}
	return filepath.Join("/Users", me.UserName, fmt.Sprintf("sdk-%x", time.Now().UnixNano()))
}()

created, err := w.Pipelines.Create(ctx, pipelines.CreatePipeline{
	Continuous: false,
	Name:       fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	Libraries: []pipelines.PipelineLibrary{pipelines.PipelineLibrary{
		Notebook: &pipelines.NotebookLibrary{
			Path: notebookPath,
		},
	}},
	Clusters: []pipelines.PipelineCluster{pipelines.PipelineCluster{
		InstancePoolId: os.Getenv("TEST_INSTANCE_POOL_ID"),
		Label:          "default",
		NumWorkers:     1,
		CustomTags:     map[string]string{"cluster_type": "default"},
	}},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

// cleanup

err = w.Pipelines.DeleteByPipelineId(ctx, created.PipelineId)
if err != nil {
	panic(err)
}
Output:

func (*PipelinesAPI) Delete

func (a *PipelinesAPI) Delete(ctx context.Context, request DeletePipelineRequest) error

Delete a pipeline.

Deletes a pipeline.

func (*PipelinesAPI) DeleteByPipelineId

func (a *PipelinesAPI) DeleteByPipelineId(ctx context.Context, pipelineId string) error

Delete a pipeline.

Deletes a pipeline.

func (*PipelinesAPI) Get

Get a pipeline.

Example (Pipelines)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

notebookPath := func() string {
	me, err := w.CurrentUser.Me(ctx)
	if err != nil {
		panic(err)
	}
	return filepath.Join("/Users", me.UserName, fmt.Sprintf("sdk-%x", time.Now().UnixNano()))
}()

created, err := w.Pipelines.Create(ctx, pipelines.CreatePipeline{
	Continuous: false,
	Name:       fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	Libraries: []pipelines.PipelineLibrary{pipelines.PipelineLibrary{
		Notebook: &pipelines.NotebookLibrary{
			Path: notebookPath,
		},
	}},
	Clusters: []pipelines.PipelineCluster{pipelines.PipelineCluster{
		InstancePoolId: os.Getenv("TEST_INSTANCE_POOL_ID"),
		Label:          "default",
		NumWorkers:     1,
		CustomTags:     map[string]string{"cluster_type": "default"},
	}},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

byId, err := w.Pipelines.GetByPipelineId(ctx, created.PipelineId)
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", byId)

// cleanup

err = w.Pipelines.DeleteByPipelineId(ctx, created.PipelineId)
if err != nil {
	panic(err)
}
Output:

func (*PipelinesAPI) GetByName

func (a *PipelinesAPI) GetByName(ctx context.Context, name string) (*PipelineStateInfo, error)

GetByName calls PipelinesAPI.PipelineStateInfoNameToPipelineIdMap and returns a single PipelineStateInfo.

Returns an error if there's more than one PipelineStateInfo with the same .Name.

Note: All PipelineStateInfo instances are loaded into memory before returning matching by name.

This method is generated by Databricks SDK Code Generator.

func (*PipelinesAPI) GetByPipelineId

func (a *PipelinesAPI) GetByPipelineId(ctx context.Context, pipelineId string) (*GetPipelineResponse, error)

Get a pipeline.

func (*PipelinesAPI) GetUpdate

func (a *PipelinesAPI) GetUpdate(ctx context.Context, request GetUpdateRequest) (*GetUpdateResponse, error)

Get a pipeline update.

Gets an update from an active pipeline.

func (*PipelinesAPI) GetUpdateByPipelineIdAndUpdateId

func (a *PipelinesAPI) GetUpdateByPipelineIdAndUpdateId(ctx context.Context, pipelineId string, updateId string) (*GetUpdateResponse, error)

Get a pipeline update.

Gets an update from an active pipeline.

func (*PipelinesAPI) Impl

func (a *PipelinesAPI) Impl() PipelinesService

Impl returns low-level Pipelines API implementation

func (*PipelinesAPI) ListPipelineEventsAll

func (a *PipelinesAPI) ListPipelineEventsAll(ctx context.Context, request ListPipelineEventsRequest) ([]PipelineEvent, error)

List pipeline events.

Retrieves events for a pipeline.

This method is generated by Databricks SDK Code Generator.

func (*PipelinesAPI) ListPipelineEventsByPipelineId

func (a *PipelinesAPI) ListPipelineEventsByPipelineId(ctx context.Context, pipelineId string) (*ListPipelineEventsResponse, error)

List pipeline events.

Retrieves events for a pipeline.

func (*PipelinesAPI) ListPipelinesAll

func (a *PipelinesAPI) ListPipelinesAll(ctx context.Context, request ListPipelinesRequest) ([]PipelineStateInfo, error)

List pipelines.

Lists pipelines defined in the Delta Live Tables system.

This method is generated by Databricks SDK Code Generator.

func (*PipelinesAPI) ListUpdates

func (a *PipelinesAPI) ListUpdates(ctx context.Context, request ListUpdatesRequest) (*ListUpdatesResponse, error)

List pipeline updates.

List updates for an active pipeline.

func (*PipelinesAPI) ListUpdatesByPipelineId

func (a *PipelinesAPI) ListUpdatesByPipelineId(ctx context.Context, pipelineId string) (*ListUpdatesResponse, error)

List pipeline updates.

List updates for an active pipeline.

func (*PipelinesAPI) PipelineStateInfoNameToPipelineIdMap

func (a *PipelinesAPI) PipelineStateInfoNameToPipelineIdMap(ctx context.Context, request ListPipelinesRequest) (map[string]string, error)

PipelineStateInfoNameToPipelineIdMap calls PipelinesAPI.ListPipelinesAll and creates a map of results with PipelineStateInfo.Name as key and PipelineStateInfo.PipelineId as value.

Returns an error if there's more than one PipelineStateInfo with the same .Name.

Note: All PipelineStateInfo instances are loaded into memory before creating a map.

This method is generated by Databricks SDK Code Generator.

func (*PipelinesAPI) Reset

func (a *PipelinesAPI) Reset(ctx context.Context, resetRequest ResetRequest) (*WaitGetPipelineRunning[any], error)

Reset a pipeline.

Resets a pipeline.

func (*PipelinesAPI) ResetAndWait deprecated

func (a *PipelinesAPI) ResetAndWait(ctx context.Context, resetRequest ResetRequest, options ...retries.Option[GetPipelineResponse]) (*GetPipelineResponse, error)

Calls PipelinesAPI.Reset and waits to reach RUNNING state

You can override the default timeout of 20 minutes by calling adding retries.Timeout[GetPipelineResponse](60*time.Minute) functional option.

Deprecated: use PipelinesAPI.Reset.Get() or PipelinesAPI.WaitGetPipelineRunning

func (*PipelinesAPI) StartUpdate

func (a *PipelinesAPI) StartUpdate(ctx context.Context, request StartUpdate) (*StartUpdateResponse, error)

Queue a pipeline update.

Starts or queues a pipeline update.

func (*PipelinesAPI) Stop

func (a *PipelinesAPI) Stop(ctx context.Context, stopRequest StopRequest) (*WaitGetPipelineIdle[any], error)

Stop a pipeline.

Stops a pipeline.

func (*PipelinesAPI) StopAndWait deprecated

func (a *PipelinesAPI) StopAndWait(ctx context.Context, stopRequest StopRequest, options ...retries.Option[GetPipelineResponse]) (*GetPipelineResponse, error)

Calls PipelinesAPI.Stop and waits to reach IDLE state

You can override the default timeout of 20 minutes by calling adding retries.Timeout[GetPipelineResponse](60*time.Minute) functional option.

Deprecated: use PipelinesAPI.Stop.Get() or PipelinesAPI.WaitGetPipelineIdle

func (*PipelinesAPI) Update

func (a *PipelinesAPI) Update(ctx context.Context, request EditPipeline) error

Edit a pipeline.

Updates a pipeline with the supplied configuration.

Example (Pipelines)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

notebookPath := func() string {
	me, err := w.CurrentUser.Me(ctx)
	if err != nil {
		panic(err)
	}
	return filepath.Join("/Users", me.UserName, fmt.Sprintf("sdk-%x", time.Now().UnixNano()))
}()

created, err := w.Pipelines.Create(ctx, pipelines.CreatePipeline{
	Continuous: false,
	Name:       fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	Libraries: []pipelines.PipelineLibrary{pipelines.PipelineLibrary{
		Notebook: &pipelines.NotebookLibrary{
			Path: notebookPath,
		},
	}},
	Clusters: []pipelines.PipelineCluster{pipelines.PipelineCluster{
		InstancePoolId: os.Getenv("TEST_INSTANCE_POOL_ID"),
		Label:          "default",
		NumWorkers:     1,
		CustomTags:     map[string]string{"cluster_type": "default"},
	}},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

err = w.Pipelines.Update(ctx, pipelines.EditPipeline{
	PipelineId: created.PipelineId,
	Name:       fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	Libraries: []pipelines.PipelineLibrary{pipelines.PipelineLibrary{
		Notebook: &pipelines.NotebookLibrary{
			Path: notebookPath,
		},
	}},
	Clusters: []pipelines.PipelineCluster{pipelines.PipelineCluster{
		InstancePoolId: os.Getenv("TEST_INSTANCE_POOL_ID"),
		Label:          "default",
		NumWorkers:     1,
		CustomTags:     map[string]string{"cluster_type": "default"},
	}},
})
if err != nil {
	panic(err)
}

// cleanup

err = w.Pipelines.DeleteByPipelineId(ctx, created.PipelineId)
if err != nil {
	panic(err)
}
Output:

func (*PipelinesAPI) WaitGetPipelineIdle

func (a *PipelinesAPI) WaitGetPipelineIdle(ctx context.Context, pipelineId string,
	timeout time.Duration, callback func(*GetPipelineResponse)) (*GetPipelineResponse, error)

WaitGetPipelineIdle repeatedly calls PipelinesAPI.Get and waits to reach IDLE state

func (*PipelinesAPI) WaitGetPipelineRunning

func (a *PipelinesAPI) WaitGetPipelineRunning(ctx context.Context, pipelineId string,
	timeout time.Duration, callback func(*GetPipelineResponse)) (*GetPipelineResponse, error)

WaitGetPipelineRunning repeatedly calls PipelinesAPI.Get and waits to reach RUNNING state

func (*PipelinesAPI) WithImpl

func (a *PipelinesAPI) WithImpl(impl PipelinesService) *PipelinesAPI

WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.

type PipelinesService

type PipelinesService interface {

	// Create a pipeline.
	//
	// Creates a new data processing pipeline based on the requested
	// configuration. If successful, this method returns the ID of the new
	// pipeline.
	Create(ctx context.Context, request CreatePipeline) (*CreatePipelineResponse, error)

	// Delete a pipeline.
	//
	// Deletes a pipeline.
	Delete(ctx context.Context, request DeletePipelineRequest) error

	// Get a pipeline.
	Get(ctx context.Context, request GetPipelineRequest) (*GetPipelineResponse, error)

	// Get a pipeline update.
	//
	// Gets an update from an active pipeline.
	GetUpdate(ctx context.Context, request GetUpdateRequest) (*GetUpdateResponse, error)

	// List pipeline events.
	//
	// Retrieves events for a pipeline.
	//
	// Use ListPipelineEventsAll() to get all PipelineEvent instances, which will iterate over every result page.
	ListPipelineEvents(ctx context.Context, request ListPipelineEventsRequest) (*ListPipelineEventsResponse, error)

	// List pipelines.
	//
	// Lists pipelines defined in the Delta Live Tables system.
	//
	// Use ListPipelinesAll() to get all PipelineStateInfo instances, which will iterate over every result page.
	ListPipelines(ctx context.Context, request ListPipelinesRequest) (*ListPipelinesResponse, error)

	// List pipeline updates.
	//
	// List updates for an active pipeline.
	ListUpdates(ctx context.Context, request ListUpdatesRequest) (*ListUpdatesResponse, error)

	// Reset a pipeline.
	//
	// Resets a pipeline.
	Reset(ctx context.Context, request ResetRequest) error

	// Queue a pipeline update.
	//
	// Starts or queues a pipeline update.
	StartUpdate(ctx context.Context, request StartUpdate) (*StartUpdateResponse, error)

	// Stop a pipeline.
	//
	// Stops a pipeline.
	Stop(ctx context.Context, request StopRequest) error

	// Edit a pipeline.
	//
	// Updates a pipeline with the supplied configuration.
	Update(ctx context.Context, request EditPipeline) error
}

The Delta Live Tables API allows you to create, edit, delete, start, and view details about pipelines.

Delta Live Tables is a framework for building reliable, maintainable, and testable data processing pipelines. You define the transformations to perform on your data, and Delta Live Tables manages task orchestration, cluster management, monitoring, data quality, and error handling.

Instead of defining your data pipelines using a series of separate Apache Spark tasks, Delta Live Tables manages how your data is transformed based on a target schema you define for each processing step. You can also enforce data quality with Delta Live Tables expectations. Expectations allow you to define expected data quality and specify how to handle records that fail those expectations.

type ResetRequest

type ResetRequest struct {
	PipelineId string `json:"-" url:"-"`
}

Reset a pipeline

type Sequencing

type Sequencing struct {
	// A sequence number, unique and increasing within the control plane.
	ControlPlaneSeqNo int `json:"control_plane_seq_no,omitempty"`
	// the ID assigned by the data plane.
	DataPlaneId *DataPlaneId `json:"data_plane_id,omitempty"`
}

type SerializedException

type SerializedException struct {
	// Runtime class of the exception
	ClassName string `json:"class_name,omitempty"`
	// Exception message
	Message string `json:"message,omitempty"`
	// Stack trace consisting of a list of stack frames
	Stack []StackFrame `json:"stack,omitempty"`
}

type StackFrame

type StackFrame struct {
	// Class from which the method call originated
	DeclaringClass string `json:"declaring_class,omitempty"`
	// File where the method is defined
	FileName string `json:"file_name,omitempty"`
	// Line from which the method was called
	LineNumber int `json:"line_number,omitempty"`
	// Name of the method which was called
	MethodName string `json:"method_name,omitempty"`
}

type StartUpdate

type StartUpdate struct {
	Cause StartUpdateCause `json:"cause,omitempty"`
	// If true, this update will reset all tables before running.
	FullRefresh bool `json:"full_refresh,omitempty"`
	// A list of tables to update with fullRefresh. If both refresh_selection
	// and full_refresh_selection are empty, this is a full graph update. Full
	// Refresh on a table means that the states of the table will be reset
	// before the refresh.
	FullRefreshSelection []string `json:"full_refresh_selection,omitempty"`

	PipelineId string `json:"-" url:"-"`
	// A list of tables to update without fullRefresh. If both refresh_selection
	// and full_refresh_selection are empty, this is a full graph update. Full
	// Refresh on a table means that the states of the table will be reset
	// before the refresh.
	RefreshSelection []string `json:"refresh_selection,omitempty"`
}

type StartUpdateCause

type StartUpdateCause string
const StartUpdateCauseApiCall StartUpdateCause = `API_CALL`
const StartUpdateCauseJobTask StartUpdateCause = `JOB_TASK`
const StartUpdateCauseRetryOnFailure StartUpdateCause = `RETRY_ON_FAILURE`
const StartUpdateCauseSchemaChange StartUpdateCause = `SCHEMA_CHANGE`
const StartUpdateCauseServiceUpgrade StartUpdateCause = `SERVICE_UPGRADE`
const StartUpdateCauseUserAction StartUpdateCause = `USER_ACTION`

func (*StartUpdateCause) Set

func (f *StartUpdateCause) Set(v string) error

Set raw string value and validate it against allowed values

func (*StartUpdateCause) String

func (f *StartUpdateCause) String() string

String representation for fmt.Print

func (*StartUpdateCause) Type

func (f *StartUpdateCause) Type() string

Type always returns StartUpdateCause to satisfy [pflag.Value] interface

type StartUpdateResponse

type StartUpdateResponse struct {
	UpdateId string `json:"update_id,omitempty"`
}

type StopRequest

type StopRequest struct {
	PipelineId string `json:"-" url:"-"`
}

Stop a pipeline

type UpdateInfo

type UpdateInfo struct {
	// What triggered this update.
	Cause UpdateInfoCause `json:"cause,omitempty"`
	// The ID of the cluster that the update is running on.
	ClusterId string `json:"cluster_id,omitempty"`
	// The pipeline configuration with system defaults applied where unspecified
	// by the user. Not returned by ListUpdates.
	Config *PipelineSpec `json:"config,omitempty"`
	// The time when this update was created.
	CreationTime int64 `json:"creation_time,omitempty"`
	// If true, this update will reset all tables before running.
	FullRefresh bool `json:"full_refresh,omitempty"`
	// A list of tables to update with fullRefresh. If both refresh_selection
	// and full_refresh_selection are empty, this is a full graph update. Full
	// Refresh on a table means that the states of the table will be reset
	// before the refresh.
	FullRefreshSelection []string `json:"full_refresh_selection,omitempty"`
	// The ID of the pipeline.
	PipelineId string `json:"pipeline_id,omitempty"`
	// A list of tables to update without fullRefresh. If both refresh_selection
	// and full_refresh_selection are empty, this is a full graph update. Full
	// Refresh on a table means that the states of the table will be reset
	// before the refresh.
	RefreshSelection []string `json:"refresh_selection,omitempty"`
	// The update state.
	State UpdateInfoState `json:"state,omitempty"`
	// The ID of this update.
	UpdateId string `json:"update_id,omitempty"`
}

type UpdateInfoCause

type UpdateInfoCause string

What triggered this update.

const UpdateInfoCauseApiCall UpdateInfoCause = `API_CALL`
const UpdateInfoCauseJobTask UpdateInfoCause = `JOB_TASK`
const UpdateInfoCauseRetryOnFailure UpdateInfoCause = `RETRY_ON_FAILURE`
const UpdateInfoCauseSchemaChange UpdateInfoCause = `SCHEMA_CHANGE`
const UpdateInfoCauseServiceUpgrade UpdateInfoCause = `SERVICE_UPGRADE`
const UpdateInfoCauseUserAction UpdateInfoCause = `USER_ACTION`

func (*UpdateInfoCause) Set

func (f *UpdateInfoCause) Set(v string) error

Set raw string value and validate it against allowed values

func (*UpdateInfoCause) String

func (f *UpdateInfoCause) String() string

String representation for fmt.Print

func (*UpdateInfoCause) Type

func (f *UpdateInfoCause) Type() string

Type always returns UpdateInfoCause to satisfy [pflag.Value] interface

type UpdateInfoState

type UpdateInfoState string

The update state.

const UpdateInfoStateCanceled UpdateInfoState = `CANCELED`
const UpdateInfoStateCompleted UpdateInfoState = `COMPLETED`
const UpdateInfoStateCreated UpdateInfoState = `CREATED`
const UpdateInfoStateFailed UpdateInfoState = `FAILED`
const UpdateInfoStateInitializing UpdateInfoState = `INITIALIZING`
const UpdateInfoStateQueued UpdateInfoState = `QUEUED`
const UpdateInfoStateResetting UpdateInfoState = `RESETTING`
const UpdateInfoStateRunning UpdateInfoState = `RUNNING`
const UpdateInfoStateSettingUpTables UpdateInfoState = `SETTING_UP_TABLES`
const UpdateInfoStateStopping UpdateInfoState = `STOPPING`
const UpdateInfoStateWaitingForResources UpdateInfoState = `WAITING_FOR_RESOURCES`

func (*UpdateInfoState) Set

func (f *UpdateInfoState) Set(v string) error

Set raw string value and validate it against allowed values

func (*UpdateInfoState) String

func (f *UpdateInfoState) String() string

String representation for fmt.Print

func (*UpdateInfoState) Type

func (f *UpdateInfoState) Type() string

Type always returns UpdateInfoState to satisfy [pflag.Value] interface

type UpdateStateInfo

type UpdateStateInfo struct {
	CreationTime string `json:"creation_time,omitempty"`

	State UpdateStateInfoState `json:"state,omitempty"`

	UpdateId string `json:"update_id,omitempty"`
}

type UpdateStateInfoState

type UpdateStateInfoState string
const UpdateStateInfoStateCanceled UpdateStateInfoState = `CANCELED`
const UpdateStateInfoStateCompleted UpdateStateInfoState = `COMPLETED`
const UpdateStateInfoStateCreated UpdateStateInfoState = `CREATED`
const UpdateStateInfoStateFailed UpdateStateInfoState = `FAILED`
const UpdateStateInfoStateInitializing UpdateStateInfoState = `INITIALIZING`
const UpdateStateInfoStateQueued UpdateStateInfoState = `QUEUED`
const UpdateStateInfoStateResetting UpdateStateInfoState = `RESETTING`
const UpdateStateInfoStateRunning UpdateStateInfoState = `RUNNING`
const UpdateStateInfoStateSettingUpTables UpdateStateInfoState = `SETTING_UP_TABLES`
const UpdateStateInfoStateStopping UpdateStateInfoState = `STOPPING`
const UpdateStateInfoStateWaitingForResources UpdateStateInfoState = `WAITING_FOR_RESOURCES`

func (*UpdateStateInfoState) Set

func (f *UpdateStateInfoState) Set(v string) error

Set raw string value and validate it against allowed values

func (*UpdateStateInfoState) String

func (f *UpdateStateInfoState) String() string

String representation for fmt.Print

func (*UpdateStateInfoState) Type

func (f *UpdateStateInfoState) Type() string

Type always returns UpdateStateInfoState to satisfy [pflag.Value] interface

type WaitGetPipelineIdle

type WaitGetPipelineIdle[R any] struct {
	Response   *R
	PipelineId string `json:"pipeline_id"`
	// contains filtered or unexported fields
}

WaitGetPipelineIdle is a wrapper that calls PipelinesAPI.WaitGetPipelineIdle and waits to reach IDLE state.

func (*WaitGetPipelineIdle[R]) Get

Get the GetPipelineResponse with the default timeout of 20 minutes.

func (*WaitGetPipelineIdle[R]) GetWithTimeout

func (w *WaitGetPipelineIdle[R]) GetWithTimeout(timeout time.Duration) (*GetPipelineResponse, error)

Get the GetPipelineResponse with custom timeout.

func (*WaitGetPipelineIdle[R]) OnProgress

func (w *WaitGetPipelineIdle[R]) OnProgress(callback func(*GetPipelineResponse)) *WaitGetPipelineIdle[R]

OnProgress invokes a callback every time it polls for the status update.

type WaitGetPipelineRunning

type WaitGetPipelineRunning[R any] struct {
	Response   *R
	PipelineId string `json:"pipeline_id"`
	// contains filtered or unexported fields
}

WaitGetPipelineRunning is a wrapper that calls PipelinesAPI.WaitGetPipelineRunning and waits to reach RUNNING state.

func (*WaitGetPipelineRunning[R]) Get

Get the GetPipelineResponse with the default timeout of 20 minutes.

func (*WaitGetPipelineRunning[R]) GetWithTimeout

func (w *WaitGetPipelineRunning[R]) GetWithTimeout(timeout time.Duration) (*GetPipelineResponse, error)

Get the GetPipelineResponse with custom timeout.

func (*WaitGetPipelineRunning[R]) OnProgress

func (w *WaitGetPipelineRunning[R]) OnProgress(callback func(*GetPipelineResponse)) *WaitGetPipelineRunning[R]

OnProgress invokes a callback every time it polls for the status update.

Jump to

Keyboard shortcuts

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