grpcworker

package
v2.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TLSConfigForGRPC

func TLSConfigForGRPC(cfg *tls.Config) *tls.Config

TLSConfigForGRPC is a helper that builds a *tls.Config from an existing TLS config. Callers can use this when the transport needs TLS but must remain gRPC-import-free.

Types

type Server

type Server struct {
	workerapipb.UnimplementedWorkerServiceServer

	Pull *pullapi.Server

	// ResolveQueue maps a worker endpoint to the queue it reads from. A route
	// with consumer groups serves one endpoint per group, so the route alone no
	// longer identifies the queue.
	ResolveQueue func(endpoint string) (pullapi.Queue, bool)

	Authorize     workerapi.Authorizer
	MaxLeaseBatch int
}

Server exposes the optional worker gRPC transport while reusing pull semantics.

func NewServer

func NewServer(pullServer *pullapi.Server) *Server

func (*Server) Ack

func (*Server) Dequeue

func (*Server) Extend

func (s *Server) Extend(ctx context.Context, req *workerapipb.ExtendRequest) (*emptypb.Empty, error)

func (*Server) Nack

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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