Documentation ¶
Index ¶
- Constants
- func AssertUserError(t *testing.T, err error, expectedCode codes.Code)
- func DecompressPipelineTarball(compressedFile []byte) ([]byte, error)
- func DecompressPipelineZip(compressedFile []byte) ([]byte, error)
- func GetPipelineName(queryString string, fileName string) (string, error)
- func GetPipelineNamespace(queryString string) (string, error)
- func NewReportRunMetricResult(metricName string, nodeID string, err error) *api.ReportRunMetricsResponse_ReportRunMetricResult
- func ReadPipelineFile(fileName string, fileReader io.Reader, maxFileLength int) ([]byte, error)
- func ToApiExperiment(experiment *model.Experiment) *api.Experiment
- func ToApiExperiments(experiments []*model.Experiment) []*api.Experiment
- func ToApiJob(job *model.Job) *api.Job
- func ToApiJobs(jobs []*model.Job) []*api.Job
- func ToApiPipeline(pipeline *model.Pipeline) *api.Pipeline
- func ToApiPipelineVersion(version *model.PipelineVersion) (*api.PipelineVersion, error)
- func ToApiPipelineVersions(versions []*model.PipelineVersion) ([]*api.PipelineVersion, error)
- func ToApiPipelines(pipelines []*model.Pipeline) []*api.Pipeline
- func ToApiRunDetail(run *model.RunDetail) *api.RunDetail
- func ToApiRunMetric(metric *model.RunMetric) *api.RunMetric
- func ToApiRuns(runs []*model.Run) []*api.Run
- func ToApiTask(task *model.Task) *api.Task
- func ToApiTasks(tasks []*model.Task) []*api.Task
- func ValidateAuthorizeRequest(request *api.AuthorizeRequest) error
- func ValidateCreateExperimentRequest(request *api.CreateExperimentRequest) error
- func ValidateCreatePipelineRequest(request *api.CreatePipelineRequest) error
- func ValidateExperimentResourceReference(resourceManager *resource.ResourceManager, references []*api.ResourceReference) error
- func ValidateFilter(referenceKey *api.ResourceKey) (*common.FilterContext, error)
- func ValidatePagination(pageToken string, pageSize int, keyFieldName string, queryString string, ...) (*common.PaginationContext, error)
- func ValidatePipelineSpecAndResourceReferences(resourceManager *resource.ResourceManager, spec *api.PipelineSpec, ...) error
- func ValidateReportScheduledWorkflowRequest(request *api.ReportScheduledWorkflowRequest) (*util.ScheduledWorkflow, error)
- func ValidateReportWorkflowRequest(request *api.ReportWorkflowRequest) (*util.Workflow, error)
- func ValidateRunMetric(metric *api.RunMetric) error
- type AuthServer
- type ExperimentServer
- func (s *ExperimentServer) ArchiveExperiment(ctx context.Context, request *api.ArchiveExperimentRequest) (*empty.Empty, error)
- func (s *ExperimentServer) CreateExperiment(ctx context.Context, request *api.CreateExperimentRequest) (*api.Experiment, error)
- func (s *ExperimentServer) DeleteExperiment(ctx context.Context, request *api.DeleteExperimentRequest) (*empty.Empty, error)
- func (s *ExperimentServer) GetExperiment(ctx context.Context, request *api.GetExperimentRequest) (*api.Experiment, error)
- func (s *ExperimentServer) ListExperiment(ctx context.Context, request *api.ListExperimentsRequest) (*api.ListExperimentsResponse, error)
- func (s *ExperimentServer) UnarchiveExperiment(ctx context.Context, request *api.UnarchiveExperimentRequest) (*empty.Empty, error)
- type ExperimentServerOptions
- type JobServer
- func (s *JobServer) CreateJob(ctx context.Context, request *api.CreateJobRequest) (*api.Job, error)
- func (s *JobServer) DeleteJob(ctx context.Context, request *api.DeleteJobRequest) (*empty.Empty, error)
- func (s *JobServer) DisableJob(ctx context.Context, request *api.DisableJobRequest) (*empty.Empty, error)
- func (s *JobServer) EnableJob(ctx context.Context, request *api.EnableJobRequest) (*empty.Empty, error)
- func (s *JobServer) GetJob(ctx context.Context, request *api.GetJobRequest) (*api.Job, error)
- func (s *JobServer) ListJobs(ctx context.Context, request *api.ListJobsRequest) (*api.ListJobsResponse, error)
- type JobServerOptions
- type PipelineServer
- func (s *PipelineServer) CanAccessPipeline(ctx context.Context, pipelineId string, ...) error
- func (s *PipelineServer) CanAccessPipelineVersion(ctx context.Context, versionId string, ...) error
- func (s *PipelineServer) CreatePipeline(ctx context.Context, request *api.CreatePipelineRequest) (*api.Pipeline, error)
- func (s *PipelineServer) CreatePipelineVersion(ctx context.Context, request *api.CreatePipelineVersionRequest) (*api.PipelineVersion, error)
- func (s *PipelineServer) DeletePipeline(ctx context.Context, request *api.DeletePipelineRequest) (*empty.Empty, error)
- func (s *PipelineServer) DeletePipelineVersion(ctx context.Context, request *api.DeletePipelineVersionRequest) (*empty.Empty, error)
- func (s *PipelineServer) GetPipeline(ctx context.Context, request *api.GetPipelineRequest) (*api.Pipeline, error)
- func (s *PipelineServer) GetPipelineVersion(ctx context.Context, request *api.GetPipelineVersionRequest) (*api.PipelineVersion, error)
- func (s *PipelineServer) GetPipelineVersionTemplate(ctx context.Context, request *api.GetPipelineVersionTemplateRequest) (*api.GetTemplateResponse, error)
- func (s *PipelineServer) GetTemplate(ctx context.Context, request *api.GetTemplateRequest) (*api.GetTemplateResponse, error)
- func (s *PipelineServer) ListPipelineVersions(ctx context.Context, request *api.ListPipelineVersionsRequest) (*api.ListPipelineVersionsResponse, error)
- func (s *PipelineServer) ListPipelines(ctx context.Context, request *api.ListPipelinesRequest) (*api.ListPipelinesResponse, error)
- func (s *PipelineServer) UpdatePipelineDefaultVersion(ctx context.Context, request *api.UpdatePipelineDefaultVersionRequest) (*empty.Empty, error)
- type PipelineServerOptions
- type PipelineUploadServer
- type PipelineUploadServerOptions
- type ReportServer
- type RunLogServer
- type RunServer
- func (s *RunServer) ArchiveRun(ctx context.Context, request *api.ArchiveRunRequest) (*empty.Empty, error)
- func (s *RunServer) CreateRun(ctx context.Context, request *api.CreateRunRequest) (*api.RunDetail, error)
- func (s *RunServer) DeleteRun(ctx context.Context, request *api.DeleteRunRequest) (*empty.Empty, error)
- func (s *RunServer) GetRun(ctx context.Context, request *api.GetRunRequest) (*api.RunDetail, error)
- func (s *RunServer) ListRuns(ctx context.Context, request *api.ListRunsRequest) (*api.ListRunsResponse, error)
- func (s *RunServer) ReadArtifact(ctx context.Context, request *api.ReadArtifactRequest) (*api.ReadArtifactResponse, error)
- func (s *RunServer) ReportRunMetrics(ctx context.Context, request *api.ReportRunMetricsRequest) (*api.ReportRunMetricsResponse, error)
- func (s *RunServer) RetryRun(ctx context.Context, request *api.RetryRunRequest) (*empty.Empty, error)
- func (s *RunServer) TerminateRun(ctx context.Context, request *api.TerminateRunRequest) (*empty.Empty, error)
- func (s *RunServer) UnarchiveRun(ctx context.Context, request *api.UnarchiveRunRequest) (*empty.Empty, error)
- type RunServerOptions
- type TaskServer
- type VisualizationServer
Constants ¶
const ( FormFileKey = "uploadfile" NameQueryStringKey = "name" DescriptionQueryStringKey = "description" NamespaceStringQuery = "namespace" // Pipeline Id in the query string specifies a pipeline when creating versions. PipelineKey = "pipelineid" )
These are valid conditions of a ScheduledWorkflow.
const ( RunKey = "run_id" NodeKey = "node_id" Follow = "follow" )
These are valid conditions of a ScheduledWorkflow.
const ( MaxFileNameLength = 100 MaxFileLength = 32 << 20 // 32Mb )
These are valid conditions of a ScheduledWorkflow.
Variables ¶
This section is empty.
Functions ¶
func DecompressPipelineZip ¶
func GetPipelineName ¶
This method extract the common logic of naming the pipeline. API caller can either explicitly name the pipeline through query string ?name=foobar or API server can use the file name by default.
func GetPipelineNamespace ¶
func NewReportRunMetricResult ¶
func NewReportRunMetricResult( metricName string, nodeID string, err error) *api.ReportRunMetricsResponse_ReportRunMetricResult
NewReportRunMetricResult turns error into a ReportRunMetricResult.
func ReadPipelineFile ¶
func ToApiExperiment ¶
func ToApiExperiment(experiment *model.Experiment) *api.Experiment
func ToApiExperiments ¶
func ToApiExperiments(experiments []*model.Experiment) []*api.Experiment
func ToApiPipelineVersion ¶
func ToApiPipelineVersion(version *model.PipelineVersion) (*api.PipelineVersion, error)
func ToApiPipelineVersions ¶
func ToApiPipelineVersions(versions []*model.PipelineVersion) ([]*api.PipelineVersion, error)
func ValidateAuthorizeRequest ¶
func ValidateAuthorizeRequest(request *api.AuthorizeRequest) error
func ValidateCreateExperimentRequest ¶
func ValidateCreateExperimentRequest(request *api.CreateExperimentRequest) error
func ValidateCreatePipelineRequest ¶
func ValidateCreatePipelineRequest(request *api.CreatePipelineRequest) error
func ValidateExperimentResourceReference ¶
func ValidateExperimentResourceReference(resourceManager *resource.ResourceManager, references []*api.ResourceReference) error
Verify the input resource references has one and only reference which is owner experiment.
func ValidateFilter ¶
func ValidateFilter(referenceKey *api.ResourceKey) (*common.FilterContext, error)
func ValidatePagination ¶
func ValidatePipelineSpecAndResourceReferences ¶
func ValidatePipelineSpecAndResourceReferences(resourceManager *resource.ResourceManager, spec *api.PipelineSpec, resourceReferences []*api.ResourceReference) error
func ValidateReportScheduledWorkflowRequest ¶
func ValidateReportScheduledWorkflowRequest(request *api.ReportScheduledWorkflowRequest) (*util.ScheduledWorkflow, error)
func ValidateReportWorkflowRequest ¶
func ValidateReportWorkflowRequest(request *api.ReportWorkflowRequest) (*util.Workflow, error)
func ValidateRunMetric ¶
ValidateRunMetric validates RunMetric fields from request.
Types ¶
type AuthServer ¶
type AuthServer struct {
// contains filtered or unexported fields
}
func NewAuthServer ¶
func NewAuthServer(resourceManager *resource.ResourceManager) *AuthServer
func (*AuthServer) Authorize ¶
func (s *AuthServer) Authorize(ctx context.Context, request *api.AuthorizeRequest) ( *empty.Empty, error)
type ExperimentServer ¶
type ExperimentServer struct {
// contains filtered or unexported fields
}
func NewExperimentServer ¶
func NewExperimentServer(resourceManager *resource.ResourceManager, options *ExperimentServerOptions) *ExperimentServer
func (*ExperimentServer) ArchiveExperiment ¶
func (s *ExperimentServer) ArchiveExperiment(ctx context.Context, request *api.ArchiveExperimentRequest) (*empty.Empty, error)
func (*ExperimentServer) CreateExperiment ¶
func (s *ExperimentServer) CreateExperiment(ctx context.Context, request *api.CreateExperimentRequest) ( *api.Experiment, error)
func (*ExperimentServer) DeleteExperiment ¶
func (s *ExperimentServer) DeleteExperiment(ctx context.Context, request *api.DeleteExperimentRequest) (*empty.Empty, error)
func (*ExperimentServer) GetExperiment ¶
func (s *ExperimentServer) GetExperiment(ctx context.Context, request *api.GetExperimentRequest) ( *api.Experiment, error)
func (*ExperimentServer) ListExperiment ¶
func (s *ExperimentServer) ListExperiment(ctx context.Context, request *api.ListExperimentsRequest) ( *api.ListExperimentsResponse, error)
func (*ExperimentServer) UnarchiveExperiment ¶
func (s *ExperimentServer) UnarchiveExperiment(ctx context.Context, request *api.UnarchiveExperimentRequest) (*empty.Empty, error)
type ExperimentServerOptions ¶
type ExperimentServerOptions struct {
CollectMetrics bool
}
type JobServer ¶
type JobServer struct {
// contains filtered or unexported fields
}
func NewJobServer ¶
func NewJobServer(resourceManager *resource.ResourceManager, options *JobServerOptions) *JobServer
func (*JobServer) DisableJob ¶
func (*JobServer) ListJobs ¶
func (s *JobServer) ListJobs(ctx context.Context, request *api.ListJobsRequest) (*api.ListJobsResponse, error)
type JobServerOptions ¶
type JobServerOptions struct {
CollectMetrics bool
}
type PipelineServer ¶
type PipelineServer struct {
// contains filtered or unexported fields
}
func NewPipelineServer ¶
func NewPipelineServer(resourceManager *resource.ResourceManager, options *PipelineServerOptions) *PipelineServer
func (*PipelineServer) CanAccessPipeline ¶
func (s *PipelineServer) CanAccessPipeline(ctx context.Context, pipelineId string, resourceAttributes *authorizationv1.ResourceAttributes) error
func (*PipelineServer) CanAccessPipelineVersion ¶
func (s *PipelineServer) CanAccessPipelineVersion(ctx context.Context, versionId string, resourceAttributes *authorizationv1.ResourceAttributes) error
func (*PipelineServer) CreatePipeline ¶
func (s *PipelineServer) CreatePipeline(ctx context.Context, request *api.CreatePipelineRequest) (*api.Pipeline, error)
func (*PipelineServer) CreatePipelineVersion ¶
func (s *PipelineServer) CreatePipelineVersion(ctx context.Context, request *api.CreatePipelineVersionRequest) (*api.PipelineVersion, error)
func (*PipelineServer) DeletePipeline ¶
func (s *PipelineServer) DeletePipeline(ctx context.Context, request *api.DeletePipelineRequest) (*empty.Empty, error)
func (*PipelineServer) DeletePipelineVersion ¶
func (s *PipelineServer) DeletePipelineVersion(ctx context.Context, request *api.DeletePipelineVersionRequest) (*empty.Empty, error)
func (*PipelineServer) GetPipeline ¶
func (s *PipelineServer) GetPipeline(ctx context.Context, request *api.GetPipelineRequest) (*api.Pipeline, error)
func (*PipelineServer) GetPipelineVersion ¶
func (s *PipelineServer) GetPipelineVersion(ctx context.Context, request *api.GetPipelineVersionRequest) (*api.PipelineVersion, error)
func (*PipelineServer) GetPipelineVersionTemplate ¶
func (s *PipelineServer) GetPipelineVersionTemplate(ctx context.Context, request *api.GetPipelineVersionTemplateRequest) (*api.GetTemplateResponse, error)
func (*PipelineServer) GetTemplate ¶
func (s *PipelineServer) GetTemplate(ctx context.Context, request *api.GetTemplateRequest) (*api.GetTemplateResponse, error)
func (*PipelineServer) ListPipelineVersions ¶
func (s *PipelineServer) ListPipelineVersions(ctx context.Context, request *api.ListPipelineVersionsRequest) (*api.ListPipelineVersionsResponse, error)
func (*PipelineServer) ListPipelines ¶
func (s *PipelineServer) ListPipelines(ctx context.Context, request *api.ListPipelinesRequest) (*api.ListPipelinesResponse, error)
func (*PipelineServer) UpdatePipelineDefaultVersion ¶
func (s *PipelineServer) UpdatePipelineDefaultVersion(ctx context.Context, request *api.UpdatePipelineDefaultVersionRequest) (*empty.Empty, error)
type PipelineServerOptions ¶
type PipelineServerOptions struct {
CollectMetrics bool
}
type PipelineUploadServer ¶
type PipelineUploadServer struct {
// contains filtered or unexported fields
}
func NewPipelineUploadServer ¶
func NewPipelineUploadServer(resourceManager *resource.ResourceManager, options *PipelineUploadServerOptions) *PipelineUploadServer
func (*PipelineUploadServer) UploadPipeline ¶
func (s *PipelineUploadServer) UploadPipeline(w http.ResponseWriter, r *http.Request)
HTTP multipart endpoint for uploading pipeline file. https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html This endpoint is not exposed through grpc endpoint, since grpc-gateway can't convert the gRPC endpoint to the HTTP endpoint. See https://github.com/grpc-ecosystem/grpc-gateway/issues/500 Thus we create the HTTP endpoint directly and using swagger to auto generate the HTTP client.
func (*PipelineUploadServer) UploadPipelineVersion ¶
func (s *PipelineUploadServer) UploadPipelineVersion(w http.ResponseWriter, r *http.Request)
HTTP multipart endpoint for uploading pipeline version file. https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html This endpoint is not exposed through grpc endpoint, since grpc-gateway can't convert the gRPC endpoint to the HTTP endpoint. See https://github.com/grpc-ecosystem/grpc-gateway/issues/500 Thus we create the HTTP endpoint directly and using swagger to auto generate the HTTP client.
type PipelineUploadServerOptions ¶
type PipelineUploadServerOptions struct {
CollectMetrics bool
}
type ReportServer ¶
type ReportServer struct {
// contains filtered or unexported fields
}
func NewReportServer ¶
func NewReportServer(resourceManager *resource.ResourceManager) *ReportServer
func (*ReportServer) ReportScheduledWorkflow ¶
func (s *ReportServer) ReportScheduledWorkflow(ctx context.Context, request *api.ReportScheduledWorkflowRequest) (*empty.Empty, error)
func (*ReportServer) ReportWorkflow ¶
func (s *ReportServer) ReportWorkflow(ctx context.Context, request *api.ReportWorkflowRequest) (*empty.Empty, error)
type RunLogServer ¶
type RunLogServer struct {
// contains filtered or unexported fields
}
func NewRunLogServer ¶
func NewRunLogServer(resourceManager *resource.ResourceManager) *RunLogServer
func (*RunLogServer) ReadRunLog ¶
func (s *RunLogServer) ReadRunLog(w http.ResponseWriter, r *http.Request)
Log streaming endpoint This endpoint is not exposed through grpc endpoint, since grpc-gateway cannot handle native HTTP content streaming.
type RunServer ¶
type RunServer struct {
// contains filtered or unexported fields
}
func NewRunServer ¶
func NewRunServer(resourceManager *resource.ResourceManager, options *RunServerOptions) *RunServer
func (*RunServer) ArchiveRun ¶
func (*RunServer) ListRuns ¶
func (s *RunServer) ListRuns(ctx context.Context, request *api.ListRunsRequest) (*api.ListRunsResponse, error)
func (*RunServer) ReadArtifact ¶
func (s *RunServer) ReadArtifact(ctx context.Context, request *api.ReadArtifactRequest) (*api.ReadArtifactResponse, error)
func (*RunServer) ReportRunMetrics ¶
func (s *RunServer) ReportRunMetrics(ctx context.Context, request *api.ReportRunMetricsRequest) (*api.ReportRunMetricsResponse, error)
func (*RunServer) TerminateRun ¶
func (*RunServer) UnarchiveRun ¶
type RunServerOptions ¶
type RunServerOptions struct {
CollectMetrics bool
}
type TaskServer ¶
type TaskServer struct {
// contains filtered or unexported fields
}
func NewTaskServer ¶
func NewTaskServer(resourceManager *resource.ResourceManager) *TaskServer
func (*TaskServer) CreateTask ¶
func (s *TaskServer) CreateTask(ctx context.Context, request *api.CreateTaskRequest) (*api.Task, error)
func (*TaskServer) ListTasks ¶
func (s *TaskServer) ListTasks(ctx context.Context, request *api.ListTasksRequest) ( *api.ListTasksResponse, error)
type VisualizationServer ¶
type VisualizationServer struct {
// contains filtered or unexported fields
}
func NewVisualizationServer ¶
func NewVisualizationServer(resourceManager *resource.ResourceManager, serviceHost string, servicePort string) *VisualizationServer
func (*VisualizationServer) CreateVisualization ¶
func (s *VisualizationServer) CreateVisualization(ctx context.Context, request *go_client.CreateVisualizationRequest) (*go_client.Visualization, error)