databricks

package
v1.1.33 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrSystem errors.ErrorCode = "System"
)

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(cfg *Config) error

Types

type Config

type Config struct {
	// WebAPI defines config for the base WebAPI plugin
	WebAPI webapi.PluginConfig `json:"webApi" pflag:",Defines config for the base WebAPI plugin."`

	// ResourceConstraints defines resource constraints on how many executions to be created per project/overall at any given time
	ResourceConstraints core.ResourceConstraintsSpec `` /* 141-byte string literal not displayed */

	DefaultCluster string `` /* 128-byte string literal not displayed */

	TokenKey string `json:"databricksTokenKey" pflag:",Name of the key where to find Databricks token in the secret manager."`

	DatabricksInstance string `json:"databricksInstance" pflag:",Databricks workspace instance name."`

	EntrypointFile string `` /* 138-byte string literal not displayed */
	// contains filtered or unexported fields
}

Config is config for 'databricks' plugin

func GetConfig

func GetConfig() *Config

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

for mocking/testing purposes, and we'll override this method

type Plugin

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

func (Plugin) Delete

func (p Plugin) Delete(ctx context.Context, taskCtx webapi.DeleteContext) error

func (Plugin) Get

func (p Plugin) Get(ctx context.Context, taskCtx webapi.GetContext) (latest webapi.Resource, err error)

func (Plugin) GetConfig

func (p Plugin) GetConfig() webapi.PluginConfig

func (Plugin) ResourceRequirements

func (p Plugin) ResourceRequirements(_ context.Context, _ webapi.TaskExecutionContextReader) (
	namespace core.ResourceNamespace, constraints core.ResourceConstraintsSpec, err error)

func (Plugin) Status

func (p Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase core.PhaseInfo, err error)

type ResourceMetaWrapper

type ResourceMetaWrapper struct {
	RunID              string
	DatabricksInstance string
	Token              string
}

type ResourceWrapper

type ResourceWrapper struct {
	StatusCode     int
	LifeCycleState string
	ResultState    string
	JobID          string
	Message        string
}

Jump to

Keyboard shortcuts

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