workerapipb

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkerService_Dequeue_FullMethodName = "/hookaido.worker.v1.WorkerService/Dequeue"
	WorkerService_Ack_FullMethodName     = "/hookaido.worker.v1.WorkerService/Ack"
	WorkerService_Nack_FullMethodName    = "/hookaido.worker.v1.WorkerService/Nack"
	WorkerService_Extend_FullMethodName  = "/hookaido.worker.v1.WorkerService/Extend"
)

Variables

View Source
var File_workerapi_proto protoreflect.FileDescriptor
View Source
var WorkerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hookaido.worker.v1.WorkerService",
	HandlerType: (*WorkerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Dequeue",
			Handler:    _WorkerService_Dequeue_Handler,
		},
		{
			MethodName: "Ack",
			Handler:    _WorkerService_Ack_Handler,
		},
		{
			MethodName: "Nack",
			Handler:    _WorkerService_Nack_Handler,
		},
		{
			MethodName: "Extend",
			Handler:    _WorkerService_Extend_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "workerapi.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 AckRequest

type AckRequest struct {

	// Pull endpoint path.
	Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// Exactly one of lease_id or lease_ids must be set.
	LeaseId  string   `protobuf:"bytes,2,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
	LeaseIds []string `protobuf:"bytes,3,rep,name=lease_ids,json=leaseIds,proto3" json:"lease_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*AckRequest) Descriptor deprecated

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

Deprecated: Use AckRequest.ProtoReflect.Descriptor instead.

func (*AckRequest) GetEndpoint

func (x *AckRequest) GetEndpoint() string

func (*AckRequest) GetLeaseId

func (x *AckRequest) GetLeaseId() string

func (*AckRequest) GetLeaseIds

func (x *AckRequest) GetLeaseIds() []string

func (*AckRequest) ProtoMessage

func (*AckRequest) ProtoMessage()

func (*AckRequest) ProtoReflect

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

func (*AckRequest) Reset

func (x *AckRequest) Reset()

func (*AckRequest) String

func (x *AckRequest) String() string

type AckResponse

type AckResponse struct {

	// Number of successful acks. Includes idempotent duplicate retries.
	Acked     uint32           `protobuf:"varint,1,opt,name=acked,proto3" json:"acked,omitempty"`
	Conflicts []*LeaseConflict `protobuf:"bytes,2,rep,name=conflicts,proto3" json:"conflicts,omitempty"`
	// contains filtered or unexported fields
}

func (*AckResponse) Descriptor deprecated

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

Deprecated: Use AckResponse.ProtoReflect.Descriptor instead.

func (*AckResponse) GetAcked

func (x *AckResponse) GetAcked() uint32

func (*AckResponse) GetConflicts

func (x *AckResponse) GetConflicts() []*LeaseConflict

func (*AckResponse) ProtoMessage

func (*AckResponse) ProtoMessage()

func (*AckResponse) ProtoReflect

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

func (*AckResponse) Reset

func (x *AckResponse) Reset()

func (*AckResponse) String

func (x *AckResponse) String() string

type DequeueItem

type DequeueItem struct {
	Id         string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	LeaseId    string                 `protobuf:"bytes,2,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
	ReceivedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"`
	Attempt    int32                  `protobuf:"varint,4,opt,name=attempt,proto3" json:"attempt,omitempty"`
	NextRunAt  *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=next_run_at,json=nextRunAt,proto3" json:"next_run_at,omitempty"`
	Route      string                 `protobuf:"bytes,6,opt,name=route,proto3" json:"route,omitempty"`
	Payload    []byte                 `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"`
	Headers    map[string]string      `` /* 141-byte string literal not displayed */
	Trace      map[string]string      `` /* 137-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*DequeueItem) Descriptor deprecated

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

Deprecated: Use DequeueItem.ProtoReflect.Descriptor instead.

func (*DequeueItem) GetAttempt

func (x *DequeueItem) GetAttempt() int32

func (*DequeueItem) GetHeaders

func (x *DequeueItem) GetHeaders() map[string]string

func (*DequeueItem) GetId

func (x *DequeueItem) GetId() string

func (*DequeueItem) GetLeaseId

func (x *DequeueItem) GetLeaseId() string

func (*DequeueItem) GetNextRunAt

func (x *DequeueItem) GetNextRunAt() *timestamppb.Timestamp

func (*DequeueItem) GetPayload

func (x *DequeueItem) GetPayload() []byte

func (*DequeueItem) GetReceivedAt

func (x *DequeueItem) GetReceivedAt() *timestamppb.Timestamp

func (*DequeueItem) GetRoute

func (x *DequeueItem) GetRoute() string

func (*DequeueItem) GetTrace

func (x *DequeueItem) GetTrace() map[string]string

func (*DequeueItem) ProtoMessage

func (*DequeueItem) ProtoMessage()

func (*DequeueItem) ProtoReflect

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

func (*DequeueItem) Reset

func (x *DequeueItem) Reset()

func (*DequeueItem) String

func (x *DequeueItem) String() string

type DequeueRequest

type DequeueRequest struct {

	// Pull endpoint path (same route selector used by HTTP Pull API).
	Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// Optional; defaults to 1 and is capped by server policy.
	Batch uint32 `protobuf:"varint,2,opt,name=batch,proto3" json:"batch,omitempty"`
	// Optional dequeue wait and lease values.
	MaxWait  *durationpb.Duration `protobuf:"bytes,3,opt,name=max_wait,json=maxWait,proto3" json:"max_wait,omitempty"`
	LeaseTtl *durationpb.Duration `protobuf:"bytes,4,opt,name=lease_ttl,json=leaseTtl,proto3" json:"lease_ttl,omitempty"`
	// contains filtered or unexported fields
}

func (*DequeueRequest) Descriptor deprecated

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

Deprecated: Use DequeueRequest.ProtoReflect.Descriptor instead.

func (*DequeueRequest) GetBatch

func (x *DequeueRequest) GetBatch() uint32

func (*DequeueRequest) GetEndpoint

func (x *DequeueRequest) GetEndpoint() string

func (*DequeueRequest) GetLeaseTtl

func (x *DequeueRequest) GetLeaseTtl() *durationpb.Duration

func (*DequeueRequest) GetMaxWait

func (x *DequeueRequest) GetMaxWait() *durationpb.Duration

func (*DequeueRequest) ProtoMessage

func (*DequeueRequest) ProtoMessage()

func (*DequeueRequest) ProtoReflect

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

func (*DequeueRequest) Reset

func (x *DequeueRequest) Reset()

func (*DequeueRequest) String

func (x *DequeueRequest) String() string

type DequeueResponse

type DequeueResponse struct {
	Items []*DequeueItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*DequeueResponse) Descriptor deprecated

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

Deprecated: Use DequeueResponse.ProtoReflect.Descriptor instead.

func (*DequeueResponse) GetItems

func (x *DequeueResponse) GetItems() []*DequeueItem

func (*DequeueResponse) ProtoMessage

func (*DequeueResponse) ProtoMessage()

func (*DequeueResponse) ProtoReflect

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

func (*DequeueResponse) Reset

func (x *DequeueResponse) Reset()

func (*DequeueResponse) String

func (x *DequeueResponse) String() string

type ExtendRequest

type ExtendRequest struct {

	// Pull endpoint path.
	Endpoint string               `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	LeaseId  string               `protobuf:"bytes,2,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
	ExtendBy *durationpb.Duration `protobuf:"bytes,3,opt,name=extend_by,json=extendBy,proto3" json:"extend_by,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtendRequest) Descriptor deprecated

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

Deprecated: Use ExtendRequest.ProtoReflect.Descriptor instead.

func (*ExtendRequest) GetEndpoint

func (x *ExtendRequest) GetEndpoint() string

func (*ExtendRequest) GetExtendBy

func (x *ExtendRequest) GetExtendBy() *durationpb.Duration

func (*ExtendRequest) GetLeaseId

func (x *ExtendRequest) GetLeaseId() string

func (*ExtendRequest) ProtoMessage

func (*ExtendRequest) ProtoMessage()

func (*ExtendRequest) ProtoReflect

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

func (*ExtendRequest) Reset

func (x *ExtendRequest) Reset()

func (*ExtendRequest) String

func (x *ExtendRequest) String() string

type LeaseConflict

type LeaseConflict struct {
	LeaseId string `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
	Expired bool   `protobuf:"varint,2,opt,name=expired,proto3" json:"expired,omitempty"`
	// contains filtered or unexported fields
}

func (*LeaseConflict) Descriptor deprecated

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

Deprecated: Use LeaseConflict.ProtoReflect.Descriptor instead.

func (*LeaseConflict) GetExpired

func (x *LeaseConflict) GetExpired() bool

func (*LeaseConflict) GetLeaseId

func (x *LeaseConflict) GetLeaseId() string

func (*LeaseConflict) ProtoMessage

func (*LeaseConflict) ProtoMessage()

func (*LeaseConflict) ProtoReflect

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

func (*LeaseConflict) Reset

func (x *LeaseConflict) Reset()

func (*LeaseConflict) String

func (x *LeaseConflict) String() string

type NackRequest

type NackRequest struct {

	// Pull endpoint path.
	Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// Exactly one of lease_id or lease_ids must be set.
	LeaseId  string   `protobuf:"bytes,2,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
	LeaseIds []string `protobuf:"bytes,3,rep,name=lease_ids,json=leaseIds,proto3" json:"lease_ids,omitempty"`
	// Ignored when dead=true.
	Delay  *durationpb.Duration `protobuf:"bytes,4,opt,name=delay,proto3" json:"delay,omitempty"`
	Dead   bool                 `protobuf:"varint,5,opt,name=dead,proto3" json:"dead,omitempty"`
	Reason string               `protobuf:"bytes,6,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*NackRequest) Descriptor deprecated

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

Deprecated: Use NackRequest.ProtoReflect.Descriptor instead.

func (*NackRequest) GetDead

func (x *NackRequest) GetDead() bool

func (*NackRequest) GetDelay

func (x *NackRequest) GetDelay() *durationpb.Duration

func (*NackRequest) GetEndpoint

func (x *NackRequest) GetEndpoint() string

func (*NackRequest) GetLeaseId

func (x *NackRequest) GetLeaseId() string

func (*NackRequest) GetLeaseIds

func (x *NackRequest) GetLeaseIds() []string

func (*NackRequest) GetReason

func (x *NackRequest) GetReason() string

func (*NackRequest) ProtoMessage

func (*NackRequest) ProtoMessage()

func (*NackRequest) ProtoReflect

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

func (*NackRequest) Reset

func (x *NackRequest) Reset()

func (*NackRequest) String

func (x *NackRequest) String() string

type NackResponse

type NackResponse struct {

	// Number of successful nack/dead operations. Includes idempotent retries.
	Succeeded uint32           `protobuf:"varint,1,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
	Conflicts []*LeaseConflict `protobuf:"bytes,2,rep,name=conflicts,proto3" json:"conflicts,omitempty"`
	// contains filtered or unexported fields
}

func (*NackResponse) Descriptor deprecated

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

Deprecated: Use NackResponse.ProtoReflect.Descriptor instead.

func (*NackResponse) GetConflicts

func (x *NackResponse) GetConflicts() []*LeaseConflict

func (*NackResponse) GetSucceeded

func (x *NackResponse) GetSucceeded() uint32

func (*NackResponse) ProtoMessage

func (*NackResponse) ProtoMessage()

func (*NackResponse) ProtoReflect

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

func (*NackResponse) Reset

func (x *NackResponse) Reset()

func (*NackResponse) String

func (x *NackResponse) 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) Ack

func (UnimplementedWorkerServiceServer) Dequeue

func (UnimplementedWorkerServiceServer) Extend

func (UnimplementedWorkerServiceServer) Nack

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 {
	Dequeue(ctx context.Context, in *DequeueRequest, opts ...grpc.CallOption) (*DequeueResponse, error)
	Ack(ctx context.Context, in *AckRequest, opts ...grpc.CallOption) (*AckResponse, error)
	Nack(ctx context.Context, in *NackRequest, opts ...grpc.CallOption) (*NackResponse, error)
	Extend(ctx context.Context, in *ExtendRequest, opts ...grpc.CallOption) (*emptypb.Empty, 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.

WorkerService is the optional Phase-2 gRPC transport for internal workers. It mirrors Pull API semantics without changing queue/delivery guarantees.

type WorkerServiceServer

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

WorkerService is the optional Phase-2 gRPC transport for internal workers. It mirrors Pull API semantics without changing queue/delivery guarantees.

Jump to

Keyboard shortcuts

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