Documentation
¶
Index ¶
- func ComputeActionOutputPath(ctx context.Context, namespace, name, runOutputBase, actionName string, ...) (storage.DataReference, error)
- func NewSetupContext(kubeClient pluginsCore.KubeClient, secretManager pluginsCore.SecretManager, ...) pluginsCore.SetupContext
- func NewTaskExecutionContext(taskAction *flyteorgv1.TaskAction, dataStore *storage.DataStore, ...) (*taskExecutionContext, error)
- func NewTaskExecutionMetadata(ta *flyteorgv1.TaskAction) (pluginsCore.TaskExecutionMetadata, error)
- type PluginRegistryIface
- type PluginStateManager
- func (m *PluginStateManager) Get(t interface{}) (uint8, error)
- func (m *PluginStateManager) GetNewState() (stateBytes []byte, version uint8, written bool)
- func (m *PluginStateManager) GetStateVersion() uint8
- func (m *PluginStateManager) Put(stateVersion uint8, v interface{}) error
- func (m *PluginStateManager) Reset() error
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeActionOutputPath ¶ added in v2.0.10
func ComputeActionOutputPath(ctx context.Context, namespace, name, runOutputBase, actionName string, attempt uint32) (storage.DataReference, error)
ComputeActionOutputPath constructs the full output directory for a task action:
<scheme>://<bucket>/<shard>/<rest-of-runOutputBase>/<actionName>/<attempt>
The shard is a 2-char base-36 prefix derived deterministically from the TaskAction's namespace and name. It is inserted immediately after the bucket (AWS S3 hot-spot avoidance convention) so that storage traffic is spread across key prefixes from the root. The attempt segment isolates each retry.
func NewSetupContext ¶
func NewSetupContext( kubeClient pluginsCore.KubeClient, secretManager pluginsCore.SecretManager, resourceRegistrar pluginsCore.ResourceRegistrar, enqueueOwner pluginsCore.EnqueueOwner, enqueueLabels []string, ownerKind string, metricsScope promutils.Scope, ) pluginsCore.SetupContext
NewSetupContext creates a SetupContext implementation for the executor.
func NewTaskExecutionContext ¶
func NewTaskExecutionContext( taskAction *flyteorgv1.TaskAction, dataStore *storage.DataStore, pluginStateMgr *PluginStateManager, secretManager pluginsCore.SecretManager, resourceManager pluginsCore.ResourceManager, catalogClient catalog.AsyncClient, ) (*taskExecutionContext, error)
NewTaskExecutionContext creates a TaskExecutionContext from a TaskAction and supporting dependencies.
func NewTaskExecutionMetadata ¶
func NewTaskExecutionMetadata(ta *flyteorgv1.TaskAction) (pluginsCore.TaskExecutionMetadata, error)
NewTaskExecutionMetadata creates a TaskExecutionMetadata from a TaskAction.
Types ¶
type PluginRegistryIface ¶
type PluginRegistryIface interface {
GetCorePlugins() []pluginsCore.PluginEntry
GetK8sPlugins() []k8sPlugin.PluginEntry
}
PluginRegistryIface provides access to registered plugin entries.
type PluginStateManager ¶
type PluginStateManager struct {
// contains filtered or unexported fields
}
PluginStateManager implements PluginStateReader and PluginStateWriter using Gob encoding over byte buffers. It is initialized with the previous state from TaskAction.Status.PluginState and captures new state written by the plugin during Handle.
func NewPluginStateManager ¶
func NewPluginStateManager(prevState []byte, prevVersion uint8) *PluginStateManager
NewPluginStateManager creates a PluginStateManager initialized with the previous round's state.
func (*PluginStateManager) Get ¶
func (m *PluginStateManager) Get(t interface{}) (uint8, error)
Get deserializes the previous state into t using Gob decoding. If there is no previous state, t remains its zero value and version 0 is returned.
func (*PluginStateManager) GetNewState ¶
func (m *PluginStateManager) GetNewState() (stateBytes []byte, version uint8, written bool)
GetNewState returns the new state bytes, version, and whether state was written during this round. The controller uses this to persist the state back to TaskAction.Status.
func (*PluginStateManager) GetStateVersion ¶
func (m *PluginStateManager) GetStateVersion() uint8
GetStateVersion returns the version of the previous state.
func (*PluginStateManager) Put ¶
func (m *PluginStateManager) Put(stateVersion uint8, v interface{}) error
Put serializes v using Gob encoding and stores it as the new state. Only the last call to Put is recorded; all previous calls are overwritten.
func (*PluginStateManager) Reset ¶
func (m *PluginStateManager) Reset() error
Reset clears the state to empty.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry resolves a pluginsCore.Plugin for a given task type by wrapping the global plugin registry. K8s plugins are wrapped in a PluginManager; core plugins are loaded via their PluginLoader.
func NewRegistry ¶
func NewRegistry(setupCtx pluginsCore.SetupContext, pluginRegistry PluginRegistryIface) *Registry
NewRegistry creates a Registry backed by the given plugin source and setup context.
func (*Registry) Initialize ¶
Initialize loads all registered plugins. Must be called once during startup.
func (*Registry) ResolvePlugin ¶
func (r *Registry) ResolvePlugin(taskType string) (pluginsCore.Plugin, error)
ResolvePlugin returns the plugin registered for the given task type. Falls back to the default plugin if no specific match is found.