Documentation ¶
Index ¶
- Constants
- func AddRuntimeMetadata(wf *v1alpha1.Workflow)
- func AddWorkflowLabel(ctx context.Context, wfClient workflowclient.WorkflowInterface, name string, ...) error
- func OverrideParameterWithSystemDefault(workflow util.Workflow, apiRun *api.Run) error
- func PatchPipelineDefaultParameter(text string) (string, error)
- func TerminateWorkflow(ctx context.Context, wfClient workflowclient.WorkflowInterface, name string) error
- type ClientManagerInterface
- type FakeClientManager
- func (f *FakeClientManager) ArgoClient() client.ArgoClientInterface
- func (f *FakeClientManager) Authenticators() []auth.Authenticator
- func (f *FakeClientManager) Close() error
- func (f *FakeClientManager) DB() *storage.DB
- func (f *FakeClientManager) DBStatusStore() storage.DBStatusStoreInterface
- func (f *FakeClientManager) DefaultExperimentStore() storage.DefaultExperimentStoreInterface
- func (f *FakeClientManager) ExperimentStore() storage.ExperimentStoreInterface
- func (f *FakeClientManager) JobStore() storage.JobStoreInterface
- func (f *FakeClientManager) KubernetesCoreClient() client.KubernetesCoreInterface
- func (f *FakeClientManager) LogArchive() archive.LogArchiveInterface
- func (f *FakeClientManager) ObjectStore() storage.ObjectStoreInterface
- func (f *FakeClientManager) PipelineStore() storage.PipelineStoreInterface
- func (f *FakeClientManager) ResourceReferenceStore() storage.ResourceReferenceStoreInterface
- func (f *FakeClientManager) RunStore() storage.RunStoreInterface
- func (f *FakeClientManager) SubjectAccessReviewClient() client.SubjectAccessReviewInterface
- func (f *FakeClientManager) SwfClient() client.SwfClientInterface
- func (f *FakeClientManager) TaskStore() storage.TaskStoreInterface
- func (f *FakeClientManager) Time() util.TimeInterface
- func (f *FakeClientManager) TokenReviewClient() client.TokenReviewInterface
- func (f *FakeClientManager) UUID() util.UUIDGeneratorInterface
- func (f *FakeClientManager) UpdateUUID(uuid util.UUIDGeneratorInterface)
- type ResourceManager
- func (r *ResourceManager) ArchiveExperiment(ctx context.Context, experimentId string) error
- func (r *ResourceManager) ArchiveRun(runId string) error
- func (r *ResourceManager) AuthenticateRequest(ctx context.Context) (string, error)
- func (r *ResourceManager) CreateDefaultExperiment() (string, error)
- func (r *ResourceManager) CreateExperiment(apiExperiment *api.Experiment) (*model.Experiment, error)
- func (r *ResourceManager) CreateJob(ctx context.Context, apiJob *api.Job) (*model.Job, error)
- func (r *ResourceManager) CreatePipeline(name string, description string, namespace string, pipelineFile []byte) (*model.Pipeline, error)
- func (r *ResourceManager) CreatePipelineVersion(apiVersion *api.PipelineVersion, pipelineFile []byte, ...) (*model.PipelineVersion, error)
- func (r *ResourceManager) CreateRun(ctx context.Context, apiRun *api.Run) (*model.RunDetail, error)
- func (r *ResourceManager) CreateTask(ctx context.Context, apiTask *api.Task) (*model.Task, error)
- func (r *ResourceManager) DeleteExperiment(experimentID string) error
- func (r *ResourceManager) DeleteJob(ctx context.Context, jobID string) error
- func (r *ResourceManager) DeletePipeline(pipelineId string) error
- func (r *ResourceManager) DeletePipelineVersion(pipelineVersionId string) error
- func (r *ResourceManager) DeleteRun(ctx context.Context, runID string) error
- func (r *ResourceManager) EnableJob(ctx context.Context, jobID string, enabled bool) error
- func (r *ResourceManager) GetDefaultExperimentId() (string, error)
- func (r *ResourceManager) GetExperiment(experimentId string) (*model.Experiment, error)
- func (r *ResourceManager) GetJob(id string) (*model.Job, error)
- func (r *ResourceManager) GetNamespaceFromExperimentID(experimentID string) (string, error)
- func (r *ResourceManager) GetNamespaceFromJobID(jobId string) (string, error)
- func (r *ResourceManager) GetNamespaceFromPipelineID(pipelineId string) (string, error)
- func (r *ResourceManager) GetNamespaceFromPipelineVersion(versionId string) (string, error)
- func (r *ResourceManager) GetNamespaceFromRunID(runId string) (string, error)
- func (r *ResourceManager) GetPipeline(pipelineId string) (*model.Pipeline, error)
- func (r *ResourceManager) GetPipelineTemplate(pipelineId string) ([]byte, error)
- func (r *ResourceManager) GetPipelineVersion(versionId string) (*model.PipelineVersion, error)
- func (r *ResourceManager) GetPipelineVersionTemplate(versionId string) ([]byte, error)
- func (r *ResourceManager) GetRun(runId string) (*model.RunDetail, error)
- func (r *ResourceManager) GetTime() util.TimeInterface
- func (r *ResourceManager) HaveSamplesLoaded() (bool, error)
- func (r *ResourceManager) IsRequestAuthorized(ctx context.Context, userIdentity string, ...) error
- func (r *ResourceManager) ListExperiments(filterContext *common.FilterContext, opts *list.Options) (experiments []*model.Experiment, total_size int, nextPageToken string, ...)
- func (r *ResourceManager) ListJobs(filterContext *common.FilterContext, opts *list.Options) (jobs []*model.Job, total_size int, nextPageToken string, err error)
- func (r *ResourceManager) ListPipelineVersions(pipelineId string, opts *list.Options) (pipelines []*model.PipelineVersion, total_size int, nextPageToken string, ...)
- func (r *ResourceManager) ListPipelines(filterContext *common.FilterContext, opts *list.Options) (pipelines []*model.Pipeline, total_size int, nextPageToken string, err error)
- func (r *ResourceManager) ListRuns(filterContext *common.FilterContext, opts *list.Options) (runs []*model.Run, total_size int, nextPageToken string, err error)
- func (r *ResourceManager) ListTasks(filterContext *common.FilterContext, opts *list.Options) (tasks []*model.Task, total_size int, nextPageToken string, err error)
- func (r *ResourceManager) MarkSampleLoaded() error
- func (r *ResourceManager) ReadArtifact(runID string, nodeID string, artifactName string) ([]byte, error)
- func (r *ResourceManager) ReadLog(ctx context.Context, runId string, nodeId string, follow bool, dst io.Writer) error
- func (r *ResourceManager) ReportMetric(metric *api.RunMetric, runUUID string) error
- func (r *ResourceManager) ReportScheduledWorkflowResource(swf *util.ScheduledWorkflow) error
- func (r *ResourceManager) ReportWorkflowResource(ctx context.Context, workflow *util.Workflow) error
- func (r *ResourceManager) RetryRun(ctx context.Context, runId string) error
- func (r *ResourceManager) SetDefaultExperimentId(id string) error
- func (r *ResourceManager) TerminateRun(ctx context.Context, runId string) error
- func (r *ResourceManager) ToModelExperiment(apiExperiment *api.Experiment) (*model.Experiment, error)
- func (r *ResourceManager) ToModelJob(job *api.Job, swf *util.ScheduledWorkflow, workflowSpecManifest string) (*model.Job, error)
- func (r *ResourceManager) ToModelPipelineVersion(version *api.PipelineVersion) (*model.PipelineVersion, error)
- func (r *ResourceManager) ToModelRunDetail(run *api.Run, runId string, workflow *util.Workflow, ...) (*model.RunDetail, error)
- func (r *ResourceManager) ToModelRunMetric(metric *api.RunMetric, runUUID string) *model.RunMetric
- func (r *ResourceManager) UnarchiveExperiment(experimentId string) error
- func (r *ResourceManager) UnarchiveRun(runId string) error
- func (r *ResourceManager) UpdatePipelineDefaultVersion(pipelineId string, versionId string) error
- func (r *ResourceManager) UpdatePipelineStatus(pipelineId string, status model.PipelineStatus) error
- func (r *ResourceManager) UpdatePipelineVersionStatus(pipelineId string, status model.PipelineVersionStatus) error
Constants ¶
View Source
const ( DefaultFakeUUID = "123e4567-e89b-12d3-a456-426655440000" FakeUUIDOne = "123e4567-e89b-12d3-a456-426655440001" NonDefaultFakeUUID = "123e4567-e89b-12d3-a456-426655441000" )
View Source
const ( HasDefaultBucketEnvVar = "HAS_DEFAULT_BUCKET" ProjectIDEnvVar = "PROJECT_ID" DefaultBucketNameEnvVar = "BUCKET_NAME" )
Variables ¶
This section is empty.
Functions ¶
func AddRuntimeMetadata ¶
func AddWorkflowLabel ¶
func AddWorkflowLabel(ctx context.Context, wfClient workflowclient.WorkflowInterface, name string, labelKey string, labelValue string) error
AddWorkflowLabel add label for a workflow
func OverrideParameterWithSystemDefault ¶
Patch the system-specified default parameters if available.
func PatchPipelineDefaultParameter ¶
Mutate default values of specified pipeline spec. Args:
text: (part of) pipeline file in string.
func TerminateWorkflow ¶
func TerminateWorkflow(ctx context.Context, wfClient workflowclient.WorkflowInterface, name string) error
TerminateWorkflow terminates a workflow by setting its activeDeadlineSeconds to 0
Types ¶
type ClientManagerInterface ¶
type ClientManagerInterface interface { ExperimentStore() storage.ExperimentStoreInterface PipelineStore() storage.PipelineStoreInterface JobStore() storage.JobStoreInterface RunStore() storage.RunStoreInterface TaskStore() storage.TaskStoreInterface ResourceReferenceStore() storage.ResourceReferenceStoreInterface DBStatusStore() storage.DBStatusStoreInterface DefaultExperimentStore() storage.DefaultExperimentStoreInterface ObjectStore() storage.ObjectStoreInterface ArgoClient() client.ArgoClientInterface SwfClient() client.SwfClientInterface KubernetesCoreClient() client.KubernetesCoreInterface SubjectAccessReviewClient() client.SubjectAccessReviewInterface TokenReviewClient() client.TokenReviewInterface LogArchive() archive.LogArchiveInterface Time() util.TimeInterface UUID() util.UUIDGeneratorInterface Authenticators() []kfpauth.Authenticator }
type FakeClientManager ¶
type FakeClientManager struct { ArgoClientFake *client.FakeArgoClient SubjectAccessReviewClientFake client.SubjectAccessReviewInterface AuthenticatorsFake []auth.Authenticator // contains filtered or unexported fields }
func NewFakeClientManager ¶
func NewFakeClientManager(time util.TimeInterface, uuid util.UUIDGeneratorInterface) ( *FakeClientManager, error)
func NewFakeClientManagerOrFatal ¶
func NewFakeClientManagerOrFatal(time util.TimeInterface) *FakeClientManager
func (*FakeClientManager) ArgoClient ¶
func (f *FakeClientManager) ArgoClient() client.ArgoClientInterface
func (*FakeClientManager) Authenticators ¶
func (f *FakeClientManager) Authenticators() []auth.Authenticator
func (*FakeClientManager) Close ¶
func (f *FakeClientManager) Close() error
func (*FakeClientManager) DB ¶
func (f *FakeClientManager) DB() *storage.DB
func (*FakeClientManager) DBStatusStore ¶
func (f *FakeClientManager) DBStatusStore() storage.DBStatusStoreInterface
func (*FakeClientManager) DefaultExperimentStore ¶
func (f *FakeClientManager) DefaultExperimentStore() storage.DefaultExperimentStoreInterface
func (*FakeClientManager) ExperimentStore ¶
func (f *FakeClientManager) ExperimentStore() storage.ExperimentStoreInterface
func (*FakeClientManager) JobStore ¶
func (f *FakeClientManager) JobStore() storage.JobStoreInterface
func (*FakeClientManager) KubernetesCoreClient ¶
func (f *FakeClientManager) KubernetesCoreClient() client.KubernetesCoreInterface
func (*FakeClientManager) LogArchive ¶
func (f *FakeClientManager) LogArchive() archive.LogArchiveInterface
func (*FakeClientManager) ObjectStore ¶
func (f *FakeClientManager) ObjectStore() storage.ObjectStoreInterface
func (*FakeClientManager) PipelineStore ¶
func (f *FakeClientManager) PipelineStore() storage.PipelineStoreInterface
func (*FakeClientManager) ResourceReferenceStore ¶
func (f *FakeClientManager) ResourceReferenceStore() storage.ResourceReferenceStoreInterface
func (*FakeClientManager) RunStore ¶
func (f *FakeClientManager) RunStore() storage.RunStoreInterface
func (*FakeClientManager) SubjectAccessReviewClient ¶
func (f *FakeClientManager) SubjectAccessReviewClient() client.SubjectAccessReviewInterface
func (*FakeClientManager) SwfClient ¶
func (f *FakeClientManager) SwfClient() client.SwfClientInterface
func (*FakeClientManager) TaskStore ¶
func (f *FakeClientManager) TaskStore() storage.TaskStoreInterface
func (*FakeClientManager) Time ¶
func (f *FakeClientManager) Time() util.TimeInterface
func (*FakeClientManager) TokenReviewClient ¶
func (f *FakeClientManager) TokenReviewClient() client.TokenReviewInterface
func (*FakeClientManager) UUID ¶
func (f *FakeClientManager) UUID() util.UUIDGeneratorInterface
func (*FakeClientManager) UpdateUUID ¶
func (f *FakeClientManager) UpdateUUID(uuid util.UUIDGeneratorInterface)
Update the uuid used in this fake client manager
type ResourceManager ¶
type ResourceManager struct {
// contains filtered or unexported fields
}
func NewResourceManager ¶
func NewResourceManager(clientManager ClientManagerInterface) *ResourceManager
func (*ResourceManager) ArchiveExperiment ¶
func (r *ResourceManager) ArchiveExperiment(ctx context.Context, experimentId string) error
func (*ResourceManager) ArchiveRun ¶
func (r *ResourceManager) ArchiveRun(runId string) error
func (*ResourceManager) AuthenticateRequest ¶
func (r *ResourceManager) AuthenticateRequest(ctx context.Context) (string, error)
func (*ResourceManager) CreateDefaultExperiment ¶
func (r *ResourceManager) CreateDefaultExperiment() (string, error)
Used to initialize the Experiment database with a default to be used for runs
func (*ResourceManager) CreateExperiment ¶
func (r *ResourceManager) CreateExperiment(apiExperiment *api.Experiment) (*model.Experiment, error)
func (*ResourceManager) CreatePipeline ¶
func (*ResourceManager) CreatePipelineVersion ¶
func (r *ResourceManager) CreatePipelineVersion(apiVersion *api.PipelineVersion, pipelineFile []byte, updateDefaultVersion bool) (*model.PipelineVersion, error)
func (*ResourceManager) CreateTask ¶
func (*ResourceManager) DeleteExperiment ¶
func (r *ResourceManager) DeleteExperiment(experimentID string) error
func (*ResourceManager) DeleteJob ¶
func (r *ResourceManager) DeleteJob(ctx context.Context, jobID string) error
func (*ResourceManager) DeletePipeline ¶
func (r *ResourceManager) DeletePipeline(pipelineId string) error
func (*ResourceManager) DeletePipelineVersion ¶
func (r *ResourceManager) DeletePipelineVersion(pipelineVersionId string) error
func (*ResourceManager) DeleteRun ¶
func (r *ResourceManager) DeleteRun(ctx context.Context, runID string) error
func (*ResourceManager) GetDefaultExperimentId ¶
func (r *ResourceManager) GetDefaultExperimentId() (string, error)
func (*ResourceManager) GetExperiment ¶
func (r *ResourceManager) GetExperiment(experimentId string) (*model.Experiment, error)
func (*ResourceManager) GetNamespaceFromExperimentID ¶
func (r *ResourceManager) GetNamespaceFromExperimentID(experimentID string) (string, error)
func (*ResourceManager) GetNamespaceFromJobID ¶
func (r *ResourceManager) GetNamespaceFromJobID(jobId string) (string, error)
func (*ResourceManager) GetNamespaceFromPipelineID ¶
func (r *ResourceManager) GetNamespaceFromPipelineID(pipelineId string) (string, error)
func (*ResourceManager) GetNamespaceFromPipelineVersion ¶
func (r *ResourceManager) GetNamespaceFromPipelineVersion(versionId string) (string, error)
func (*ResourceManager) GetNamespaceFromRunID ¶
func (r *ResourceManager) GetNamespaceFromRunID(runId string) (string, error)
func (*ResourceManager) GetPipeline ¶
func (r *ResourceManager) GetPipeline(pipelineId string) (*model.Pipeline, error)
func (*ResourceManager) GetPipelineTemplate ¶
func (r *ResourceManager) GetPipelineTemplate(pipelineId string) ([]byte, error)
func (*ResourceManager) GetPipelineVersion ¶
func (r *ResourceManager) GetPipelineVersion(versionId string) (*model.PipelineVersion, error)
func (*ResourceManager) GetPipelineVersionTemplate ¶
func (r *ResourceManager) GetPipelineVersionTemplate(versionId string) ([]byte, error)
func (*ResourceManager) GetRun ¶
func (r *ResourceManager) GetRun(runId string) (*model.RunDetail, error)
func (*ResourceManager) GetTime ¶
func (r *ResourceManager) GetTime() util.TimeInterface
func (*ResourceManager) HaveSamplesLoaded ¶
func (r *ResourceManager) HaveSamplesLoaded() (bool, error)
func (*ResourceManager) IsRequestAuthorized ¶
func (r *ResourceManager) IsRequestAuthorized(ctx context.Context, userIdentity string, resourceAttributes *authorizationv1.ResourceAttributes) error
func (*ResourceManager) ListExperiments ¶
func (r *ResourceManager) ListExperiments(filterContext *common.FilterContext, opts *list.Options) ( experiments []*model.Experiment, total_size int, nextPageToken string, err error)
func (*ResourceManager) ListJobs ¶
func (r *ResourceManager) ListJobs(filterContext *common.FilterContext, opts *list.Options) (jobs []*model.Job, total_size int, nextPageToken string, err error)
func (*ResourceManager) ListPipelineVersions ¶
func (r *ResourceManager) ListPipelineVersions(pipelineId string, opts *list.Options) (pipelines []*model.PipelineVersion, total_size int, nextPageToken string, err error)
func (*ResourceManager) ListPipelines ¶
func (r *ResourceManager) ListPipelines(filterContext *common.FilterContext, opts *list.Options) ( pipelines []*model.Pipeline, total_size int, nextPageToken string, err error)
func (*ResourceManager) ListRuns ¶
func (r *ResourceManager) ListRuns(filterContext *common.FilterContext, opts *list.Options) (runs []*model.Run, total_size int, nextPageToken string, err error)
func (*ResourceManager) ListTasks ¶
func (r *ResourceManager) ListTasks(filterContext *common.FilterContext, opts *list.Options) (tasks []*model.Task, total_size int, nextPageToken string, err error)
func (*ResourceManager) MarkSampleLoaded ¶
func (r *ResourceManager) MarkSampleLoaded() error
func (*ResourceManager) ReadArtifact ¶
func (r *ResourceManager) ReadArtifact(runID string, nodeID string, artifactName string) ([]byte, error)
ReadArtifact parses run's workflow to find artifact file path and reads the content of the file from object store.
func (*ResourceManager) ReportMetric ¶
func (r *ResourceManager) ReportMetric(metric *api.RunMetric, runUUID string) error
func (*ResourceManager) ReportScheduledWorkflowResource ¶
func (r *ResourceManager) ReportScheduledWorkflowResource(swf *util.ScheduledWorkflow) error
func (*ResourceManager) ReportWorkflowResource ¶
func (*ResourceManager) RetryRun ¶
func (r *ResourceManager) RetryRun(ctx context.Context, runId string) error
func (*ResourceManager) SetDefaultExperimentId ¶
func (r *ResourceManager) SetDefaultExperimentId(id string) error
func (*ResourceManager) TerminateRun ¶
func (r *ResourceManager) TerminateRun(ctx context.Context, runId string) error
func (*ResourceManager) ToModelExperiment ¶
func (r *ResourceManager) ToModelExperiment(apiExperiment *api.Experiment) (*model.Experiment, error)
func (*ResourceManager) ToModelJob ¶
func (r *ResourceManager) ToModelJob(job *api.Job, swf *util.ScheduledWorkflow, workflowSpecManifest string) (*model.Job, error)
func (*ResourceManager) ToModelPipelineVersion ¶
func (r *ResourceManager) ToModelPipelineVersion(version *api.PipelineVersion) (*model.PipelineVersion, error)
func (*ResourceManager) ToModelRunDetail ¶
func (r *ResourceManager) ToModelRunDetail(run *api.Run, runId string, workflow *util.Workflow, workflowSpecManifest string) (*model.RunDetail, error)
The input run might not contain workflowSpecManifest, but instead a pipeline ID. The caller would retrieve workflowSpecManifest and pass in.
func (*ResourceManager) ToModelRunMetric ¶
func (*ResourceManager) UnarchiveExperiment ¶
func (r *ResourceManager) UnarchiveExperiment(experimentId string) error
func (*ResourceManager) UnarchiveRun ¶
func (r *ResourceManager) UnarchiveRun(runId string) error
func (*ResourceManager) UpdatePipelineDefaultVersion ¶
func (r *ResourceManager) UpdatePipelineDefaultVersion(pipelineId string, versionId string) error
func (*ResourceManager) UpdatePipelineStatus ¶
func (r *ResourceManager) UpdatePipelineStatus(pipelineId string, status model.PipelineStatus) error
func (*ResourceManager) UpdatePipelineVersionStatus ¶
func (r *ResourceManager) UpdatePipelineVersionStatus(pipelineId string, status model.PipelineVersionStatus) error
Click to show internal directories.
Click to hide internal directories.