Documentation ¶
Overview ¶
Package worker is a generated protocol buffer package.
It is generated from these files:
server/worker/worker_service.proto
It has these top-level messages:
Input ProcessRequest ProcessResponse CancelRequest CancelResponse
Index ¶
- Variables
- func HashDatum(pipelineName string, pipelineSalt string, data []*Input) string
- func HashDatum15(pipelineInfo *pps.PipelineInfo, data []*Input) (string, error)
- func MatchDatum(filter []string, data []*pps.InputFile) bool
- func RegisterWorkerServer(s *grpc.Server, srv WorkerServer)
- type APIServer
- func (a *APIServer) Cancel(ctx context.Context, request *CancelRequest) (*CancelResponse, error)
- func (a *APIServer) DatumID(data []*Input) string
- func (a *APIServer) Process(ctx context.Context, req *ProcessRequest) (resp *ProcessResponse, retErr error)
- func (a *APIServer) Status(ctx context.Context, _ *types.Empty) (*pps.WorkerStatus, error)
- type CancelRequest
- func (*CancelRequest) Descriptor() ([]byte, []int)
- func (m *CancelRequest) GetDataFilters() []string
- func (m *CancelRequest) GetJobID() string
- func (m *CancelRequest) Marshal() (dAtA []byte, err error)
- func (m *CancelRequest) MarshalTo(dAtA []byte) (int, error)
- func (*CancelRequest) ProtoMessage()
- func (m *CancelRequest) Reset()
- func (m *CancelRequest) Size() (n int)
- func (m *CancelRequest) String() string
- func (m *CancelRequest) Unmarshal(dAtA []byte) error
- type CancelResponse
- func (*CancelResponse) Descriptor() ([]byte, []int)
- func (m *CancelResponse) GetSuccess() bool
- func (m *CancelResponse) Marshal() (dAtA []byte, err error)
- func (m *CancelResponse) MarshalTo(dAtA []byte) (int, error)
- func (*CancelResponse) ProtoMessage()
- func (m *CancelResponse) Reset()
- func (m *CancelResponse) Size() (n int)
- func (m *CancelResponse) String() string
- func (m *CancelResponse) Unmarshal(dAtA []byte) error
- type DatumFactory
- type Input
- func (*Input) Descriptor() ([]byte, []int)
- func (m *Input) GetBranch() string
- func (m *Input) GetFileInfo() *pfs.FileInfo
- func (m *Input) GetLazy() bool
- func (m *Input) GetName() string
- func (m *Input) GetParentCommit() *pfs.Commit
- func (m *Input) Marshal() (dAtA []byte, err error)
- func (m *Input) MarshalTo(dAtA []byte) (int, error)
- func (*Input) ProtoMessage()
- func (m *Input) Reset()
- func (m *Input) Size() (n int)
- func (m *Input) String() string
- func (m *Input) Unmarshal(dAtA []byte) error
- type ProcessRequest
- func (*ProcessRequest) Descriptor() ([]byte, []int)
- func (m *ProcessRequest) GetData() []*Input
- func (m *ProcessRequest) GetEnableStats() bool
- func (m *ProcessRequest) GetJobID() string
- func (m *ProcessRequest) GetParentOutput() *pfs.Tag
- func (m *ProcessRequest) Marshal() (dAtA []byte, err error)
- func (m *ProcessRequest) MarshalTo(dAtA []byte) (int, error)
- func (*ProcessRequest) ProtoMessage()
- func (m *ProcessRequest) Reset()
- func (m *ProcessRequest) Size() (n int)
- func (m *ProcessRequest) String() string
- func (m *ProcessRequest) Unmarshal(dAtA []byte) error
- type ProcessResponse
- func (*ProcessResponse) Descriptor() ([]byte, []int)
- func (m *ProcessResponse) GetFailed() bool
- func (m *ProcessResponse) GetSkipped() bool
- func (m *ProcessResponse) GetStats() *pps.ProcessStats
- func (m *ProcessResponse) Marshal() (dAtA []byte, err error)
- func (m *ProcessResponse) MarshalTo(dAtA []byte) (int, error)
- func (*ProcessResponse) ProtoMessage()
- func (m *ProcessResponse) Reset()
- func (m *ProcessResponse) Size() (n int)
- func (m *ProcessResponse) String() string
- func (m *ProcessResponse) Unmarshal(dAtA []byte) error
- type WorkerClient
- type WorkerServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthWorkerService = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowWorkerService = fmt.Errorf("proto: integer overflow") )
Functions ¶
func HashDatum ¶
HashDatum computes and returns the hash of datum + pipeline, with a pipeline-specific prefix.
func HashDatum15 ¶
func HashDatum15(pipelineInfo *pps.PipelineInfo, data []*Input) (string, error)
HashDatum15 computes and returns the hash of datum + pipeline for version <= 1.5.0, with a pipeline-specific prefix.
func MatchDatum ¶
MatchDatum checks if a datum matches a filter. To match each string in filter must correspond match at least 1 datum's Path or Hash. Order of filter and data is irrelevant.
func RegisterWorkerServer ¶
func RegisterWorkerServer(s *grpc.Server, srv WorkerServer)
Types ¶
type APIServer ¶
type APIServer struct {
// contains filtered or unexported fields
}
APIServer implements the worker API
func NewAPIServer ¶
func NewAPIServer(pachClient *client.APIClient, etcdClient *etcd.Client, etcdPrefix string, pipelineInfo *pps.PipelineInfo, workerName string, namespace string) (*APIServer, error)
NewAPIServer creates an APIServer for a given pipeline
func (*APIServer) Cancel ¶
func (a *APIServer) Cancel(ctx context.Context, request *CancelRequest) (*CancelResponse, error)
Cancel cancels the currently running datum
func (*APIServer) DatumID ¶ added in v1.6.0
DatumID computes the id for a datum, this value is used in ListDatum and InspectDatum.
func (*APIServer) Process ¶
func (a *APIServer) Process(ctx context.Context, req *ProcessRequest) (resp *ProcessResponse, retErr error)
Process processes a datum.
type CancelRequest ¶
type CancelRequest struct { JobID string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` DataFilters []string `protobuf:"bytes,1,rep,name=data_filters,json=dataFilters" json:"data_filters,omitempty"` }
func (*CancelRequest) Descriptor ¶
func (*CancelRequest) Descriptor() ([]byte, []int)
func (*CancelRequest) GetDataFilters ¶
func (m *CancelRequest) GetDataFilters() []string
func (*CancelRequest) GetJobID ¶
func (m *CancelRequest) GetJobID() string
func (*CancelRequest) Marshal ¶
func (m *CancelRequest) Marshal() (dAtA []byte, err error)
func (*CancelRequest) ProtoMessage ¶
func (*CancelRequest) ProtoMessage()
func (*CancelRequest) Reset ¶
func (m *CancelRequest) Reset()
func (*CancelRequest) Size ¶
func (m *CancelRequest) Size() (n int)
func (*CancelRequest) String ¶
func (m *CancelRequest) String() string
func (*CancelRequest) Unmarshal ¶
func (m *CancelRequest) Unmarshal(dAtA []byte) error
type CancelResponse ¶
type CancelResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}
func (*CancelResponse) Descriptor ¶
func (*CancelResponse) Descriptor() ([]byte, []int)
func (*CancelResponse) GetSuccess ¶
func (m *CancelResponse) GetSuccess() bool
func (*CancelResponse) Marshal ¶
func (m *CancelResponse) Marshal() (dAtA []byte, err error)
func (*CancelResponse) ProtoMessage ¶
func (*CancelResponse) ProtoMessage()
func (*CancelResponse) Reset ¶
func (m *CancelResponse) Reset()
func (*CancelResponse) Size ¶
func (m *CancelResponse) Size() (n int)
func (*CancelResponse) String ¶
func (m *CancelResponse) String() string
func (*CancelResponse) Unmarshal ¶
func (m *CancelResponse) Unmarshal(dAtA []byte) error
type DatumFactory ¶ added in v1.5.3
DatumFactory is an interface which allows you to iterate through the datums for a job.
func NewDatumFactory ¶ added in v1.5.3
func NewDatumFactory(ctx context.Context, pfsClient pfs.APIClient, input *pps.Input) (DatumFactory, error)
NewDatumFactory creates a datumFactory for an input.
type Input ¶
type Input struct { FileInfo *pfs.FileInfo `protobuf:"bytes,1,opt,name=file_info,json=fileInfo" json:"file_info,omitempty"` ParentCommit *pfs.Commit `protobuf:"bytes,5,opt,name=parent_commit,json=parentCommit" json:"parent_commit,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Lazy bool `protobuf:"varint,3,opt,name=lazy,proto3" json:"lazy,omitempty"` Branch string `protobuf:"bytes,4,opt,name=branch,proto3" json:"branch,omitempty"` }
func (*Input) Descriptor ¶
func (*Input) GetFileInfo ¶
func (*Input) GetParentCommit ¶
func (*Input) ProtoMessage ¶
func (*Input) ProtoMessage()
type ProcessRequest ¶
type ProcessRequest struct { // ID of the job for which we're processing 'data'. This is attached to logs // generated while processing 'data', so that they can be searched. JobID string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // The datum to process Data []*Input `protobuf:"bytes,1,rep,name=data" json:"data,omitempty"` // The tag corresponding to the previous parent's run of this datum, used for // incremental jobs, may be nil. ParentOutput *pfs.Tag `protobuf:"bytes,3,opt,name=parent_output,json=parentOutput" json:"parent_output,omitempty"` EnableStats bool `protobuf:"varint,4,opt,name=enable_stats,json=enableStats,proto3" json:"enable_stats,omitempty"` }
func (*ProcessRequest) Descriptor ¶
func (*ProcessRequest) Descriptor() ([]byte, []int)
func (*ProcessRequest) GetData ¶
func (m *ProcessRequest) GetData() []*Input
func (*ProcessRequest) GetEnableStats ¶
func (m *ProcessRequest) GetEnableStats() bool
func (*ProcessRequest) GetJobID ¶
func (m *ProcessRequest) GetJobID() string
func (*ProcessRequest) GetParentOutput ¶
func (m *ProcessRequest) GetParentOutput() *pfs.Tag
func (*ProcessRequest) Marshal ¶
func (m *ProcessRequest) Marshal() (dAtA []byte, err error)
func (*ProcessRequest) ProtoMessage ¶
func (*ProcessRequest) ProtoMessage()
func (*ProcessRequest) Reset ¶
func (m *ProcessRequest) Reset()
func (*ProcessRequest) Size ¶
func (m *ProcessRequest) Size() (n int)
func (*ProcessRequest) String ¶
func (m *ProcessRequest) String() string
func (*ProcessRequest) Unmarshal ¶
func (m *ProcessRequest) Unmarshal(dAtA []byte) error
type ProcessResponse ¶
type ProcessResponse struct { Stats *pps.ProcessStats `protobuf:"bytes,4,opt,name=stats" json:"stats,omitempty"` // If true, the user program has errored Failed bool `protobuf:"varint,2,opt,name=failed,proto3" json:"failed,omitempty"` Skipped bool `protobuf:"varint,5,opt,name=skipped,proto3" json:"skipped,omitempty"` }
ProcessResponse contains a tag, only if the processing was successful.
func (*ProcessResponse) Descriptor ¶
func (*ProcessResponse) Descriptor() ([]byte, []int)
func (*ProcessResponse) GetFailed ¶
func (m *ProcessResponse) GetFailed() bool
func (*ProcessResponse) GetSkipped ¶
func (m *ProcessResponse) GetSkipped() bool
func (*ProcessResponse) GetStats ¶ added in v1.5.3
func (m *ProcessResponse) GetStats() *pps.ProcessStats
func (*ProcessResponse) Marshal ¶
func (m *ProcessResponse) Marshal() (dAtA []byte, err error)
func (*ProcessResponse) ProtoMessage ¶
func (*ProcessResponse) ProtoMessage()
func (*ProcessResponse) Reset ¶
func (m *ProcessResponse) Reset()
func (*ProcessResponse) Size ¶
func (m *ProcessResponse) Size() (n int)
func (*ProcessResponse) String ¶
func (m *ProcessResponse) String() string
func (*ProcessResponse) Unmarshal ¶
func (m *ProcessResponse) Unmarshal(dAtA []byte) error
type WorkerClient ¶
type WorkerClient interface { Process(ctx context.Context, in *ProcessRequest, opts ...grpc.CallOption) (*ProcessResponse, error) Status(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*pps.WorkerStatus, error) Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*CancelResponse, error) }
func NewWorkerClient ¶
func NewWorkerClient(cc *grpc.ClientConn) WorkerClient
type WorkerServer ¶
type WorkerServer interface { Process(context.Context, *ProcessRequest) (*ProcessResponse, error) Status(context.Context, *google_protobuf.Empty) (*pps.WorkerStatus, error) Cancel(context.Context, *CancelRequest) (*CancelResponse, error) }