Documentation ¶
Index ¶
- func RegisterAgentPlugin(supportedTaskTypes SupportedTaskTypes)
- func SetConfig(cfg *Config) error
- type Agent
- type Config
- type GetClientFunc
- type Plugin
- func (p Plugin) Create(ctx context.Context, taskCtx webapi.TaskExecutionContextReader) (webapi.ResourceMeta, webapi.Resource, error)
- func (p Plugin) Delete(ctx context.Context, taskCtx webapi.DeleteContext) error
- func (p Plugin) Get(ctx context.Context, taskCtx webapi.GetContext) (latest webapi.Resource, err error)
- func (p Plugin) GetConfig() webapi.PluginConfig
- func (p Plugin) ResourceRequirements(_ context.Context, _ webapi.TaskExecutionContextReader) (namespace core.ResourceNamespace, constraints core.ResourceConstraintsSpec, ...)
- func (p Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase core.PhaseInfo, err error)
- type ResourceMetaWrapper
- type ResourceWrapper
- type SupportedTaskTypes
- type TaskType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAgentPlugin ¶
func RegisterAgentPlugin(supportedTaskTypes SupportedTaskTypes)
Types ¶
type Agent ¶
type Agent struct { // Endpoint points to an agent 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 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 agent if there does not exist a more specific matching against task types DefaultAgent Agent `json:"defaultAgent" pflag:",The default agent."` // The agents used to match against specific task types. {AgentId: Agent} Agents map[string]*Agent `json:"agents" pflag:",The agents."` // Maps task types to their agents. {TaskType: AgentId} AgentForTaskTypes map[string]string `json:"agentForTaskTypes" pflag:"-,"` }
Config is config for 'agent' plugin
type GetClientFunc ¶
type GetClientFunc func(ctx context.Context, agent *Agent, connectionCache map[*Agent]*grpc.ClientConn) (service.AsyncAgentServiceClient, error)
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (Plugin) Create ¶
func (p Plugin) Create(ctx context.Context, taskCtx webapi.TaskExecutionContextReader) (webapi.ResourceMeta, webapi.Resource, 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)
type ResourceMetaWrapper ¶
type ResourceWrapper ¶
type ResourceWrapper struct { State admin.State Outputs *flyteIdl.LiteralMap }
type SupportedTaskTypes ¶
type SupportedTaskTypes []TaskType
Click to show internal directories.
Click to hide internal directories.