grpc

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCServer

func NewGRPCServer(node http.Node, port int) (*grpc.Server, error)

Types

type GRPCProxy added in v0.2.16

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

func NewGRPCProxy added in v0.2.16

func NewGRPCProxy(client pb.DOQClient, port int) *GRPCProxy

func (*GRPCProxy) Ack added in v0.2.16

func (p *GRPCProxy) Ack(ctx context.Context, host string, req *pb.AckRequest) (*pb.AckResponse, error)

func (*GRPCProxy) CreateQueue added in v0.2.16

func (p *GRPCProxy) CreateQueue(ctx context.Context, host string, req *pb.CreateQueueRequest) (*pb.CreateQueueResponse, error)

func (*GRPCProxy) Delete added in v0.3.0

func (p *GRPCProxy) Delete(ctx context.Context, host string, req *pb.DeleteRequest) (*pb.DeleteResponse, error)

func (*GRPCProxy) DeleteQueue added in v0.2.16

func (p *GRPCProxy) DeleteQueue(ctx context.Context, host string, req *pb.DeleteQueueRequest) (*pb.DeleteQueueResponse, error)

func (*GRPCProxy) Dequeue added in v0.2.16

func (p *GRPCProxy) Dequeue(ctx context.Context, host string, req *pb.DequeueRequest) (*pb.DequeueResponse, error)

func (*GRPCProxy) DequeueStream added in v0.2.16

func (p *GRPCProxy) DequeueStream(outStream pb.DOQ_DequeueStreamServer, host string) error

func (*GRPCProxy) Enqueue added in v0.2.16

func (p *GRPCProxy) Enqueue(ctx context.Context, host string, req *pb.EnqueueRequest) (*pb.EnqueueResponse, error)

func (*GRPCProxy) EnqueueStream added in v0.2.16

func (p *GRPCProxy) EnqueueStream(inStream pb.DOQ_EnqueueStreamServer, host string) error

func (*GRPCProxy) Get added in v0.3.0

func (p *GRPCProxy) Get(ctx context.Context, host string, req *pb.GetRequest) (*pb.GetResponse, error)

func (*GRPCProxy) Nack added in v0.2.16

func (p *GRPCProxy) Nack(ctx context.Context, host string, req *pb.NackRequest) (*pb.NackResponse, error)

func (*GRPCProxy) UpdatePriority added in v0.2.16

func (p *GRPCProxy) UpdatePriority(ctx context.Context, host string, req *pb.UpdatePriorityRequest) (*pb.UpdatePriorityResponse, error)

type QueueServer

type QueueServer struct {
	pb.UnimplementedDOQServer
	// contains filtered or unexported fields
}

func NewQueueServer

func NewQueueServer(node http.Node, port int) *QueueServer

func (*QueueServer) Ack added in v0.2.4

func (s *QueueServer) Ack(ctx context.Context, req *pb.AckRequest) (*pb.AckResponse, error)

Ack acknowledges a message (this could be used to confirm message processing)

func (*QueueServer) CreateQueue

func (s *QueueServer) CreateQueue(
	ctx context.Context,
	req *pb.CreateQueueRequest,
) (*pb.CreateQueueResponse, error)

CreateQueue creates a new queue

func (*QueueServer) Delete added in v0.3.0

func (s *QueueServer) Delete(
	ctx context.Context,
	req *pb.DeleteRequest,
) (*pb.DeleteResponse, error)

Delete deletes a message from a queue by ID (this could be used to remove a message from a queue in case of processing failure if max attempts reached)

func (*QueueServer) DeleteQueue

func (s *QueueServer) DeleteQueue(
	ctx context.Context,
	req *pb.DeleteQueueRequest,
) (*pb.DeleteQueueResponse, error)

DeleteQueue deletes a queue with all messages

func (*QueueServer) Dequeue

func (s *QueueServer) Dequeue(
	ctx context.Context,
	req *pb.DequeueRequest,
) (*pb.DequeueResponse, error)

Dequeue dequeues a message from a queue

func (*QueueServer) DequeueStream

func (s *QueueServer) DequeueStream(stream pb.DOQ_DequeueStreamServer) error

DequeueStream implements server-side streaming for dequeuing messages

func (*QueueServer) Enqueue

func (s *QueueServer) Enqueue(
	ctx context.Context,
	req *pb.EnqueueRequest,
) (*pb.EnqueueResponse, error)

Enqueue enqueues a message to a queue

func (*QueueServer) EnqueueStream

func (s *QueueServer) EnqueueStream(stream pb.DOQ_EnqueueStreamServer) error

EnqueueStream implements client-side streaming for enqueuing messages

func (*QueueServer) Get added in v0.3.0

func (s *QueueServer) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)

Get returns a message from a queue by ID

func (*QueueServer) GetQueue added in v0.7.2

func (s *QueueServer) GetQueue(
	ctx context.Context,
	req *pb.GetQueueRequest,
) (*pb.GetQueueResponse, error)

GetQueue returns a queue by name

func (*QueueServer) GetQueues added in v0.7.2

func (s *QueueServer) GetQueues(
	ctx context.Context,
	req *pb.GetQueuesRequest,
) (*pb.GetQueuesResponse, error)

GetQueues returns a list of all queues

func (*QueueServer) Nack added in v0.2.4

func (s *QueueServer) Nack(ctx context.Context, req *pb.NackRequest) (*pb.NackResponse, error)

Nack negatively acknowledges a message (this could be used to put a message back to the queue in case of processing failure)

func (*QueueServer) UpdatePriority

func (s *QueueServer) UpdatePriority(
	ctx context.Context,
	req *pb.UpdatePriorityRequest,
) (*pb.UpdatePriorityResponse, error)

UpdatePriority updates priority of a message

Jump to

Keyboard shortcuts

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