workerpb

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkerService_RegisterTasks_FullMethodName = "/worker.v1.WorkerService/RegisterTasks"
	WorkerService_StreamResults_FullMethodName = "/worker.v1.WorkerService/StreamResults"
	WorkerService_CancelTask_FullMethodName    = "/worker.v1.WorkerService/CancelTask"
	WorkerService_GetTask_FullMethodName       = "/worker.v1.WorkerService/GetTask"
)

Variables

View Source
var File_worker_v1_payload_proto protoreflect.FileDescriptor
View Source
var File_worker_v1_worker_proto protoreflect.FileDescriptor
View Source
var WorkerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "worker.v1.WorkerService",
	HandlerType: (*WorkerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RegisterTasks",
			Handler:    _WorkerService_RegisterTasks_Handler,
		},
		{
			MethodName: "CancelTask",
			Handler:    _WorkerService_CancelTask_Handler,
		},
		{
			MethodName: "GetTask",
			Handler:    _WorkerService_GetTask_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamResults",
			Handler:       _WorkerService_StreamResults_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "worker/v1/worker.proto",
}

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

Functions

func RegisterWorkerServiceServer

func RegisterWorkerServiceServer(s grpc.ServiceRegistrar, srv WorkerServiceServer)

Types

type CancelTaskRequest

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

func (*CancelTaskRequest) Descriptor deprecated

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

Deprecated: Use CancelTaskRequest.ProtoReflect.Descriptor instead.

func (*CancelTaskRequest) GetId

func (x *CancelTaskRequest) GetId() string

func (*CancelTaskRequest) ProtoMessage

func (*CancelTaskRequest) ProtoMessage()

func (*CancelTaskRequest) ProtoReflect

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

func (*CancelTaskRequest) Reset

func (x *CancelTaskRequest) Reset()

func (*CancelTaskRequest) String

func (x *CancelTaskRequest) String() string

type CancelTaskResponse

type CancelTaskResponse struct {
	// contains filtered or unexported fields
}

func (*CancelTaskResponse) Descriptor deprecated

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

Deprecated: Use CancelTaskResponse.ProtoReflect.Descriptor instead.

func (*CancelTaskResponse) ProtoMessage

func (*CancelTaskResponse) ProtoMessage()

func (*CancelTaskResponse) ProtoReflect

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

func (*CancelTaskResponse) Reset

func (x *CancelTaskResponse) Reset()

func (*CancelTaskResponse) String

func (x *CancelTaskResponse) String() string

type GetTaskRequest

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

func (*GetTaskRequest) Descriptor deprecated

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

Deprecated: Use GetTaskRequest.ProtoReflect.Descriptor instead.

func (*GetTaskRequest) GetId

func (x *GetTaskRequest) GetId() string

func (*GetTaskRequest) ProtoMessage

func (*GetTaskRequest) ProtoMessage()

func (*GetTaskRequest) ProtoReflect

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

func (*GetTaskRequest) Reset

func (x *GetTaskRequest) Reset()

func (*GetTaskRequest) String

func (x *GetTaskRequest) String() string

type GetTaskResponse

type GetTaskResponse struct {
	Id     string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name   string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	Output string `protobuf:"bytes,4,opt,name=output,proto3" json:"output,omitempty"`
	Error  string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTaskResponse) Descriptor deprecated

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

Deprecated: Use GetTaskResponse.ProtoReflect.Descriptor instead.

func (*GetTaskResponse) GetError

func (x *GetTaskResponse) GetError() string

func (*GetTaskResponse) GetId

func (x *GetTaskResponse) GetId() string

func (*GetTaskResponse) GetName

func (x *GetTaskResponse) GetName() string

func (*GetTaskResponse) GetOutput

func (x *GetTaskResponse) GetOutput() string

func (*GetTaskResponse) GetStatus

func (x *GetTaskResponse) GetStatus() string

func (*GetTaskResponse) ProtoMessage

func (*GetTaskResponse) ProtoMessage()

func (*GetTaskResponse) ProtoReflect

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

func (*GetTaskResponse) Reset

func (x *GetTaskResponse) Reset()

func (*GetTaskResponse) String

func (x *GetTaskResponse) String() string

type RegisterTasksRequest

type RegisterTasksRequest struct {
	Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterTasksRequest) Descriptor deprecated

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

Deprecated: Use RegisterTasksRequest.ProtoReflect.Descriptor instead.

func (*RegisterTasksRequest) GetTasks

func (x *RegisterTasksRequest) GetTasks() []*Task

func (*RegisterTasksRequest) ProtoMessage

func (*RegisterTasksRequest) ProtoMessage()

func (*RegisterTasksRequest) ProtoReflect

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

func (*RegisterTasksRequest) Reset

func (x *RegisterTasksRequest) Reset()

func (*RegisterTasksRequest) String

func (x *RegisterTasksRequest) String() string

type RegisterTasksResponse

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

func (*RegisterTasksResponse) Descriptor deprecated

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

Deprecated: Use RegisterTasksResponse.ProtoReflect.Descriptor instead.

func (*RegisterTasksResponse) GetIds

func (x *RegisterTasksResponse) GetIds() []string

func (*RegisterTasksResponse) ProtoMessage

func (*RegisterTasksResponse) ProtoMessage()

func (*RegisterTasksResponse) ProtoReflect

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

func (*RegisterTasksResponse) Reset

func (x *RegisterTasksResponse) Reset()

func (*RegisterTasksResponse) String

func (x *RegisterTasksResponse) String() string

type SendEmailPayload

type SendEmailPayload struct {
	To      string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
	Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
	Body    string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

Example Payload

func (*SendEmailPayload) Descriptor deprecated

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

Deprecated: Use SendEmailPayload.ProtoReflect.Descriptor instead.

func (*SendEmailPayload) GetBody

func (x *SendEmailPayload) GetBody() string

func (*SendEmailPayload) GetSubject

func (x *SendEmailPayload) GetSubject() string

func (*SendEmailPayload) GetTo

func (x *SendEmailPayload) GetTo() string

func (*SendEmailPayload) ProtoMessage

func (*SendEmailPayload) ProtoMessage()

func (*SendEmailPayload) ProtoReflect

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

func (*SendEmailPayload) Reset

func (x *SendEmailPayload) Reset()

func (*SendEmailPayload) String

func (x *SendEmailPayload) String() string

type StreamResultsRequest

type StreamResultsRequest struct {
	Ids               []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`                                                         // only these
	CloseOnCompletion bool     `protobuf:"varint,2,opt,name=close_on_completion,json=closeOnCompletion,proto3" json:"close_on_completion,omitempty"` // server ends stream when all are terminal
	// contains filtered or unexported fields
}

func (*StreamResultsRequest) Descriptor deprecated

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

Deprecated: Use StreamResultsRequest.ProtoReflect.Descriptor instead.

func (*StreamResultsRequest) GetCloseOnCompletion

func (x *StreamResultsRequest) GetCloseOnCompletion() bool

func (*StreamResultsRequest) GetIds

func (x *StreamResultsRequest) GetIds() []string

func (*StreamResultsRequest) ProtoMessage

func (*StreamResultsRequest) ProtoMessage()

func (*StreamResultsRequest) ProtoReflect

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

func (*StreamResultsRequest) Reset

func (x *StreamResultsRequest) Reset()

func (*StreamResultsRequest) String

func (x *StreamResultsRequest) String() string

type StreamResultsResponse

type StreamResultsResponse struct {
	Id     string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
	Error  string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamResultsResponse) Descriptor deprecated

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

Deprecated: Use StreamResultsResponse.ProtoReflect.Descriptor instead.

func (*StreamResultsResponse) GetError

func (x *StreamResultsResponse) GetError() string

func (*StreamResultsResponse) GetId

func (x *StreamResultsResponse) GetId() string

func (*StreamResultsResponse) GetOutput

func (x *StreamResultsResponse) GetOutput() string

func (*StreamResultsResponse) ProtoMessage

func (*StreamResultsResponse) ProtoMessage()

func (*StreamResultsResponse) ProtoReflect

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

func (*StreamResultsResponse) Reset

func (x *StreamResultsResponse) Reset()

func (*StreamResultsResponse) String

func (x *StreamResultsResponse) String() string

type Task

type Task struct {
	Name        string               `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string               `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Priority    int32                `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"`
	Retries     int32                `protobuf:"varint,4,opt,name=retries,proto3" json:"retries,omitempty"`
	RetryDelay  *durationpb.Duration `protobuf:"bytes,5,opt,name=retry_delay,json=retryDelay,proto3" json:"retry_delay,omitempty"`
	Payload     *anypb.Any           `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // the typed input for `name`
	// Generic envelope bits useful for most handlers:
	CorrelationId  string            `protobuf:"bytes,7,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`    // trace across systems
	IdempotencyKey string            `protobuf:"bytes,8,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` // dedupe on the server/handler
	Metadata       map[string]string ``                                                                                                        // free-form tags
	/* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Task) Descriptor deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetCorrelationId

func (x *Task) GetCorrelationId() string

func (*Task) GetDescription

func (x *Task) GetDescription() string

func (*Task) GetIdempotencyKey

func (x *Task) GetIdempotencyKey() string

func (*Task) GetMetadata

func (x *Task) GetMetadata() map[string]string

func (*Task) GetName

func (x *Task) GetName() string

func (*Task) GetPayload

func (x *Task) GetPayload() *anypb.Any

func (*Task) GetPriority

func (x *Task) GetPriority() int32

func (*Task) GetRetries

func (x *Task) GetRetries() int32

func (*Task) GetRetryDelay

func (x *Task) GetRetryDelay() *durationpb.Duration

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

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

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type UnimplementedWorkerServiceServer

type UnimplementedWorkerServiceServer struct{}

UnimplementedWorkerServiceServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedWorkerServiceServer) CancelTask

func (UnimplementedWorkerServiceServer) GetTask

func (UnimplementedWorkerServiceServer) RegisterTasks

type UnsafeWorkerServiceServer

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

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

type WorkerServiceClient

type WorkerServiceClient interface {
	RegisterTasks(ctx context.Context, in *RegisterTasksRequest, opts ...grpc.CallOption) (*RegisterTasksResponse, error)
	StreamResults(ctx context.Context, in *StreamResultsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamResultsResponse], error)
	CancelTask(ctx context.Context, in *CancelTaskRequest, opts ...grpc.CallOption) (*CancelTaskResponse, error)
	GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*GetTaskResponse, error)
}

WorkerServiceClient is the client API for WorkerService 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.

type WorkerServiceServer

WorkerServiceServer is the server API for WorkerService service. All implementations should embed UnimplementedWorkerServiceServer for forward compatibility.

type WorkerService_StreamResultsClient

type WorkerService_StreamResultsClient = grpc.ServerStreamingClient[StreamResultsResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type WorkerService_StreamResultsServer

type WorkerService_StreamResultsServer = grpc.ServerStreamingServer[StreamResultsResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

Jump to

Keyboard shortcuts

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