Documentation
¶
Index ¶
- type Authorizer
- type Server
- func (s *Server) Ack(ctx context.Context, req *workerapipb.AckRequest) (*workerapipb.AckResponse, error)
- func (s *Server) Dequeue(ctx context.Context, req *workerapipb.DequeueRequest) (*workerapipb.DequeueResponse, error)
- func (s *Server) Extend(ctx context.Context, req *workerapipb.ExtendRequest) (*emptypb.Empty, error)
- func (s *Server) Nack(ctx context.Context, req *workerapipb.NackRequest) (*workerapipb.NackResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
Authorizer decides whether a worker API request is authorized.
func BearerTokenAuthorizer ¶
func BearerTokenAuthorizer(tokens [][]byte) Authorizer
BearerTokenAuthorizer validates gRPC metadata Authorization headers. Expected format: "Authorization: Bearer <token>".
type Server ¶
type Server struct {
workerapipb.UnimplementedWorkerServiceServer
Pull *pullapi.Server
ResolveRoute func(endpoint string) (route string, ok bool)
Authorize Authorizer
MaxLeaseBatch int
}
Server exposes the optional worker gRPC transport while reusing pull semantics.
func (*Server) Ack ¶
func (s *Server) Ack(ctx context.Context, req *workerapipb.AckRequest) (*workerapipb.AckResponse, error)
func (*Server) Dequeue ¶
func (s *Server) Dequeue(ctx context.Context, req *workerapipb.DequeueRequest) (*workerapipb.DequeueResponse, error)
func (*Server) Extend ¶
func (s *Server) Extend(ctx context.Context, req *workerapipb.ExtendRequest) (*emptypb.Empty, error)
func (*Server) Nack ¶
func (s *Server) Nack(ctx context.Context, req *workerapipb.NackRequest) (*workerapipb.NackResponse, error)
Click to show internal directories.
Click to hide internal directories.