connector

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 31 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ID = "connector-service"

Variables

This section is empty.

Functions

func RegisterConnectorPlugin

func RegisterConnectorPlugin(connectorService *ConnectorService)

func SetConfig

func SetConfig(cfg *Config) error

Types

type ClientSet

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

ClientSet contains the clients exposed to communicate with various connector services.

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 */

	// The default connector if there does not exist a more specific matching against task types
	DefaultConnector Deployment `json:"defaultConnector" pflag:",The default connector."`

	// The connectors used to match against specific task types. {connectorDeploymentID: ConnectorDeployment}
	ConnectorDeployments map[string]*Deployment `json:"connectors" pflag:",The connectors."`

	// Maps task types to their connectors. {TaskType: connectorDeploymentID}
	ConnectorForTaskTypes map[string]string `json:"connectorForTaskTypes" pflag:"-,"`

	// SupportedTaskTypes is a list of task types that are supported by this plugin.
	SupportedTaskTypes []string `json:"supportedTaskTypes" pflag:"-,Defines a list of task types that are supported by this plugin."`

	// PollInterval is the interval at which the plugin should poll the connector for metadata updates
	PollInterval config.Duration `json:"pollInterval" pflag:",The interval at which the plugin should poll the connector for metadata updates."`
}

Config is config for 'connector' plugin

func GetConfig

func GetConfig() *Config

type Connector

type Connector struct {
	// IsSync indicates whether this connector is a sync connector. Sync connectors are expected to return their
	// results synchronously when called by propeller. Given that sync connectors can affect the performance
	// of the system, it's important to enforce strict timeout policies.
	// An Async connector, on the other hand, is required to be able to identify jobs by an
	// identifier and query for job statuses as jobs progress.
	IsSync bool
	// ConnectorDeployment is the connector deployment where this connector is running.
	ConnectorDeployment *Deployment
}

type ConnectorService

type ConnectorService struct {
	CorePlugin core.Plugin
	// contains filtered or unexported fields
}

func (*ConnectorService) ContainTaskType

func (p *ConnectorService) ContainTaskType(taskType string) bool

ContainTaskType check if connector supports this task type.

func (*ConnectorService) SetSupportedTaskType

func (p *ConnectorService) SetSupportedTaskType(taskTypes []string)

SetSupportedTaskType set supportTaskType in the connector service.

type Deployment

type Deployment struct {
	// Endpoint points to a connector gRPC endpoint
	Endpoint string `json:"endpoint"`

	// Insecure indicates whether the communication with the gRPC service is insecure
	Insecure bool `json:"insecure"`

	// DefaultServiceConfig sets default gRPC service config; check https://github.com/grpc/grpc/blob/master/doc/service_config.md for more details
	DefaultServiceConfig string `json:"defaultServiceConfig"`

	// Timeouts defines various RPC timeout values for different plugin operations: CreateTask, GetTask, DeleteTask; if not configured, defaults to DefaultTimeout
	Timeouts map[string]config.Duration `json:"timeouts"`

	// DefaultTimeout gives the default RPC timeout if a more specific one is not defined in Timeouts; if neither DefaultTimeout nor Timeouts is defined for an operation, RPC timeout will not be enforced
	DefaultTimeout config.Duration `json:"defaultTimeout"`
}

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 Registry

type Registry map[string]map[int32]*Connector // map[taskTypeName][taskTypeVersion] => Connector

type ResourceMetaWrapper

type ResourceMetaWrapper struct {
	OutputPrefix          string
	ConnectorResourceMeta []byte
	TaskCategory          admin.TaskCategory
}

type ResourceWrapper

type ResourceWrapper struct {
	Phase flyteIdl.TaskExecution_Phase
	// Deprecated: Please Use Phase instead.
	State          admin.State
	Outputs        *flyteIdl.LiteralMap
	Message        string
	LogLinks       []*flyteIdl.TaskLog
	CustomInfo     *structpb.Struct
	ConnectorError *admin.AgentError
}

func (ResourceWrapper) IsTerminal

func (r ResourceWrapper) IsTerminal() bool

IsTerminal is used to avoid making network calls to the connector service if the resource is already in a terminal state.

Jump to

Keyboard shortcuts

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