Documentation ¶
Overview ¶
Package jobservices handles services necessary WRT handling jobs from SDKs. Nominally this is the entry point for most users, and a job's external interactions outside of pipeline execution.
This includes handling receiving, staging, and provisioning artifacts, and orchestrating external workers, such as for loopback mode.
Execution of jobs is abstracted away to an execute function specified at server construction time.
Index ¶
- type Job
- type Server
- func (s *Server) Endpoint() string
- func (s *Server) GetJobMetrics(ctx context.Context, req *jobpb.GetJobMetricsRequest) (*jobpb.GetJobMetricsResponse, error)
- func (s *Server) GetMessageStream(req *jobpb.JobMessagesRequest, stream jobpb.JobService_GetMessageStreamServer) error
- func (s *Server) Prepare(ctx context.Context, req *jobpb.PrepareJobRequest) (*jobpb.PrepareJobResponse, error)
- func (s *Server) ReverseArtifactRetrievalService(stream jobpb.ArtifactStagingService_ReverseArtifactRetrievalServiceServer) error
- func (s *Server) Run(ctx context.Context, req *jobpb.RunJobRequest) (*jobpb.RunJobResponse, error)
- func (s *Server) Serve()
- func (s *Server) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { Pipeline *pipepb.Pipeline // Context used to terminate this job. RootCtx context.Context CancelFn context.CancelFunc // contains filtered or unexported fields }
Job is an interface to the job services for executing pipelines. It allows the executor to communicate status, messages, and metrics back to callers of the Job Management API.
func (*Job) ContributeMetrics ¶
func (j *Job) ContributeMetrics(payloads *fnpb.ProcessBundleResponse)
type Server ¶
type Server struct { jobpb.UnimplementedJobServiceServer jobpb.UnimplementedArtifactStagingServiceServer // contains filtered or unexported fields }
func (*Server) GetJobMetrics ¶
func (s *Server) GetJobMetrics(ctx context.Context, req *jobpb.GetJobMetricsRequest) (*jobpb.GetJobMetricsResponse, error)
GetJobMetrics Fetch metrics for a given job.
func (*Server) GetMessageStream ¶
func (s *Server) GetMessageStream(req *jobpb.JobMessagesRequest, stream jobpb.JobService_GetMessageStreamServer) error
GetMessageStream subscribes to a stream of state changes and messages from the job
func (*Server) Prepare ¶
func (s *Server) Prepare(ctx context.Context, req *jobpb.PrepareJobRequest) (*jobpb.PrepareJobResponse, error)
func (*Server) ReverseArtifactRetrievalService ¶
func (s *Server) ReverseArtifactRetrievalService(stream jobpb.ArtifactStagingService_ReverseArtifactRetrievalServiceServer) error
func (*Server) Run ¶
func (s *Server) Run(ctx context.Context, req *jobpb.RunJobRequest) (*jobpb.RunJobResponse, error)