worker

package
v2.7.0-nightly.20230726 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Worker_Status_FullMethodName    = "/pachyderm.worker.Worker/Status"
	Worker_Cancel_FullMethodName    = "/pachyderm.worker.Worker/Cancel"
	Worker_NextDatum_FullMethodName = "/pachyderm.worker.Worker/NextDatum"
)

Variables

View Source
var File_worker_worker_proto protoreflect.FileDescriptor
View Source
var Worker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pachyderm.worker.Worker",
	HandlerType: (*WorkerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Status",
			Handler:    _Worker_Status_Handler,
		},
		{
			MethodName: "Cancel",
			Handler:    _Worker_Cancel_Handler,
		},
		{
			MethodName: "NextDatum",
			Handler:    _Worker_NextDatum_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "worker/worker.proto",
}

Worker_ServiceDesc is the grpc.ServiceDesc for Worker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterWorkerServer

func RegisterWorkerServer(s grpc.ServiceRegistrar, srv WorkerServer)

Types

type CancelRequest

type CancelRequest struct {
	JobId       string   `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	DataFilters []string `protobuf:"bytes,2,rep,name=data_filters,json=dataFilters,proto3" json:"data_filters,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelRequest) Descriptor deprecated

func (*CancelRequest) Descriptor() ([]byte, []int)

Deprecated: Use CancelRequest.ProtoReflect.Descriptor instead.

func (*CancelRequest) GetDataFilters

func (x *CancelRequest) GetDataFilters() []string

func (*CancelRequest) GetJobId added in v2.7.0

func (x *CancelRequest) GetJobId() string

func (*CancelRequest) MarshalLogObject

func (x *CancelRequest) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*CancelRequest) ProtoMessage

func (*CancelRequest) ProtoMessage()

func (*CancelRequest) ProtoReflect added in v2.7.0

func (x *CancelRequest) ProtoReflect() protoreflect.Message

func (*CancelRequest) Reset

func (x *CancelRequest) Reset()

func (*CancelRequest) String

func (x *CancelRequest) String() string

type CancelResponse

type CancelResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelResponse) Descriptor deprecated

func (*CancelResponse) Descriptor() ([]byte, []int)

Deprecated: Use CancelResponse.ProtoReflect.Descriptor instead.

func (*CancelResponse) GetSuccess

func (x *CancelResponse) GetSuccess() bool

func (*CancelResponse) MarshalLogObject

func (x *CancelResponse) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*CancelResponse) ProtoMessage

func (*CancelResponse) ProtoMessage()

func (*CancelResponse) ProtoReflect added in v2.7.0

func (x *CancelResponse) ProtoReflect() protoreflect.Message

func (*CancelResponse) Reset

func (x *CancelResponse) Reset()

func (*CancelResponse) String

func (x *CancelResponse) String() string

type NextDatumRequest

type NextDatumRequest struct {
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

Error indicates that the processing of the current datum errored. Datum error semantics with datum batching enabled are similar to datum error semantics without datum batching enabled in that the datum may be retried, recovered, or result with a job failure.

func (*NextDatumRequest) Descriptor deprecated

func (*NextDatumRequest) Descriptor() ([]byte, []int)

Deprecated: Use NextDatumRequest.ProtoReflect.Descriptor instead.

func (*NextDatumRequest) GetError

func (x *NextDatumRequest) GetError() string

func (*NextDatumRequest) MarshalLogObject

func (x *NextDatumRequest) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*NextDatumRequest) ProtoMessage

func (*NextDatumRequest) ProtoMessage()

func (*NextDatumRequest) ProtoReflect added in v2.7.0

func (x *NextDatumRequest) ProtoReflect() protoreflect.Message

func (*NextDatumRequest) Reset

func (x *NextDatumRequest) Reset()

func (*NextDatumRequest) String

func (x *NextDatumRequest) String() string

type NextDatumResponse

type NextDatumResponse struct {
	Env []string `protobuf:"bytes,1,rep,name=env,proto3" json:"env,omitempty"`
	// contains filtered or unexported fields
}

Env is a list of environment variables that should be set for the processing of the next datum.

func (*NextDatumResponse) Descriptor deprecated

func (*NextDatumResponse) Descriptor() ([]byte, []int)

Deprecated: Use NextDatumResponse.ProtoReflect.Descriptor instead.

func (*NextDatumResponse) GetEnv

func (x *NextDatumResponse) GetEnv() []string

func (*NextDatumResponse) MarshalLogObject

func (x *NextDatumResponse) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*NextDatumResponse) ProtoMessage

func (*NextDatumResponse) ProtoMessage()

func (*NextDatumResponse) ProtoReflect added in v2.7.0

func (x *NextDatumResponse) ProtoReflect() protoreflect.Message

func (*NextDatumResponse) Reset

func (x *NextDatumResponse) Reset()

func (*NextDatumResponse) String

func (x *NextDatumResponse) String() string

type UnimplementedWorkerServer

type UnimplementedWorkerServer struct {
}

UnimplementedWorkerServer must be embedded to have forward compatible implementations.

func (UnimplementedWorkerServer) Cancel

func (UnimplementedWorkerServer) NextDatum

func (UnimplementedWorkerServer) Status

type UnsafeWorkerServer added in v2.7.0

type UnsafeWorkerServer interface {
	// contains filtered or unexported methods
}

UnsafeWorkerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WorkerServer will result in compilation errors.

type WorkerClient

type WorkerClient interface {
	Status(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*pps.WorkerStatus, error)
	Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*CancelResponse, error)
	// NextDatum should only be called by user code running in a pipeline with
	// datum batching enabled.
	// NextDatum will signal to the worker code that the user code is ready to
	// proceed to the next datum. This generally means setting up the next
	// datum's filesystem state and updating internal metadata similarly to datum
	// processing in a normal pipeline.
	// NextDatum is a synchronous operation, so user code should expect to block
	// on this until the next datum is set up for processing.
	// User code should generally be migratable to datum batching by wrapping it
	// in a loop that calls next datum.
	NextDatum(ctx context.Context, in *NextDatumRequest, opts ...grpc.CallOption) (*NextDatumResponse, error)
}

WorkerClient is the client API for Worker service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewWorkerClient

func NewWorkerClient(cc grpc.ClientConnInterface) WorkerClient

type WorkerServer

type WorkerServer interface {
	Status(context.Context, *emptypb.Empty) (*pps.WorkerStatus, error)
	Cancel(context.Context, *CancelRequest) (*CancelResponse, error)
	// NextDatum should only be called by user code running in a pipeline with
	// datum batching enabled.
	// NextDatum will signal to the worker code that the user code is ready to
	// proceed to the next datum. This generally means setting up the next
	// datum's filesystem state and updating internal metadata similarly to datum
	// processing in a normal pipeline.
	// NextDatum is a synchronous operation, so user code should expect to block
	// on this until the next datum is set up for processing.
	// User code should generally be migratable to datum batching by wrapping it
	// in a loop that calls next datum.
	NextDatum(context.Context, *NextDatumRequest) (*NextDatumResponse, error)
	// contains filtered or unexported methods
}

WorkerServer is the server API for Worker service. All implementations must embed UnimplementedWorkerServer for forward compatibility

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL