comms

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueueService_IsFrontOfQueue_FullMethodName       = "/comms.QueueService/IsFrontOfQueue"
	QueueService_SubscribeQueueStatus_FullMethodName = "/comms.QueueService/SubscribeQueueStatus"
	QueueService_Shutdown_FullMethodName             = "/comms.QueueService/Shutdown"
)

Variables

View Source
var File_queueservice_proto protoreflect.FileDescriptor
View Source
var QueueService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "comms.QueueService",
	HandlerType: (*QueueServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "IsFrontOfQueue",
			Handler:    _QueueService_IsFrontOfQueue_Handler,
		},
		{
			MethodName: "Shutdown",
			Handler:    _QueueService_Shutdown_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeQueueStatus",
			Handler:       _QueueService_SubscribeQueueStatus_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "queueservice.proto",
}

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

Functions

func RegisterQueueServiceServer

func RegisterQueueServiceServer(s grpc.ServiceRegistrar, srv QueueServiceServer)

Types

type QueueRequest

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

func (*QueueRequest) Descriptor deprecated

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

Deprecated: Use QueueRequest.ProtoReflect.Descriptor instead.

func (*QueueRequest) ProtoMessage

func (*QueueRequest) ProtoMessage()

func (*QueueRequest) ProtoReflect

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

func (*QueueRequest) Reset

func (x *QueueRequest) Reset()

func (*QueueRequest) String

func (x *QueueRequest) String() string

type QueueServiceClient

type QueueServiceClient interface {
	// Checks if the lock is currently held
	IsFrontOfQueue(ctx context.Context, in *QueueRequest, opts ...grpc.CallOption) (*QueueStatus, error)
	// Waits for a signal that the lock is obtained
	SubscribeQueueStatus(ctx context.Context, in *QueueRequest, opts ...grpc.CallOption) (QueueService_SubscribeQueueStatusClient, error)
	// Tells the lock handler to shut down
	Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error)
}

QueueServiceClient is the client API for QueueService 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 QueueServiceServer

type QueueServiceServer interface {
	// Checks if the lock is currently held
	IsFrontOfQueue(context.Context, *QueueRequest) (*QueueStatus, error)
	// Waits for a signal that the lock is obtained
	SubscribeQueueStatus(*QueueRequest, QueueService_SubscribeQueueStatusServer) error
	// Tells the lock handler to shut down
	Shutdown(context.Context, *ShutdownRequest) (*ShutdownResponse, error)
	// contains filtered or unexported methods
}

QueueServiceServer is the server API for QueueService service. All implementations must embed UnimplementedQueueServiceServer for forward compatibility

type QueueService_SubscribeQueueStatusClient

type QueueService_SubscribeQueueStatusClient interface {
	Recv() (*QueueStatus, error)
	grpc.ClientStream
}

type QueueService_SubscribeQueueStatusServer

type QueueService_SubscribeQueueStatusServer interface {
	Send(*QueueStatus) error
	grpc.ServerStream
}

type QueueStatus

type QueueStatus struct {
	IsFront bool `protobuf:"varint,1,opt,name=isFront,proto3" json:"isFront,omitempty"`
	// contains filtered or unexported fields
}

func (*QueueStatus) Descriptor deprecated

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

Deprecated: Use QueueStatus.ProtoReflect.Descriptor instead.

func (*QueueStatus) GetIsFront

func (x *QueueStatus) GetIsFront() bool

func (*QueueStatus) ProtoMessage

func (*QueueStatus) ProtoMessage()

func (*QueueStatus) ProtoReflect

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

func (*QueueStatus) Reset

func (x *QueueStatus) Reset()

func (*QueueStatus) String

func (x *QueueStatus) String() string

type ShutdownRequest

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

func (*ShutdownRequest) Descriptor deprecated

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

Deprecated: Use ShutdownRequest.ProtoReflect.Descriptor instead.

func (*ShutdownRequest) ProtoMessage

func (*ShutdownRequest) ProtoMessage()

func (*ShutdownRequest) ProtoReflect

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

func (*ShutdownRequest) Reset

func (x *ShutdownRequest) Reset()

func (*ShutdownRequest) String

func (x *ShutdownRequest) String() string

type ShutdownResponse

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

func (*ShutdownResponse) Descriptor deprecated

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

Deprecated: Use ShutdownResponse.ProtoReflect.Descriptor instead.

func (*ShutdownResponse) ProtoMessage

func (*ShutdownResponse) ProtoMessage()

func (*ShutdownResponse) ProtoReflect

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

func (*ShutdownResponse) Reset

func (x *ShutdownResponse) Reset()

func (*ShutdownResponse) String

func (x *ShutdownResponse) String() string

type UnimplementedQueueServiceServer

type UnimplementedQueueServiceServer struct {
}

UnimplementedQueueServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedQueueServiceServer) IsFrontOfQueue

func (UnimplementedQueueServiceServer) Shutdown

func (UnimplementedQueueServiceServer) SubscribeQueueStatus

type UnsafeQueueServiceServer

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

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

Jump to

Keyboard shortcuts

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