api

package
v0.0.0-...-b7a815f Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MessageType_name = map[int32]string{
		0: "APPLICATION",
		1: "ACK",
		2: "SYSTEM",
	}
	MessageType_value = map[string]int32{
		"APPLICATION": 0,
		"ACK":         1,
		"SYSTEM":      2,
	}
)

Enum value maps for MessageType.

View Source
var File_LamportClockService_proto protoreflect.FileDescriptor
View Source
var MessageQueueLC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "MessageQueueLC",
	HandlerType: (*MessageQueueLCServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Enqueue",
			Handler:    _MessageQueueLC_Enqueue_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "LamportClockService.proto",
}

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

Functions

func RegisterMessageQueueLCServer

func RegisterMessageQueueLCServer(s grpc.ServiceRegistrar, srv MessageQueueLCServer)

Types

type EnqueueReply

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

func (*EnqueueReply) Descriptor deprecated

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

Deprecated: Use EnqueueReply.ProtoReflect.Descriptor instead.

func (*EnqueueReply) ProtoMessage

func (*EnqueueReply) ProtoMessage()

func (*EnqueueReply) ProtoReflect

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

func (*EnqueueReply) Reset

func (x *EnqueueReply) Reset()

func (*EnqueueReply) String

func (x *EnqueueReply) String() string

type MessageLC

type MessageLC struct {
	Type  MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=MessageType" json:"type,omitempty"`
	Clock uint64      `protobuf:"varint,2,opt,name=clock,proto3" json:"clock,omitempty"`
	Src   string      `protobuf:"bytes,3,opt,name=src,proto3" json:"src,omitempty"`
	Id    string      `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
	Data  string      `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageLC) Descriptor deprecated

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

Deprecated: Use MessageLC.ProtoReflect.Descriptor instead.

func (*MessageLC) GetClock

func (x *MessageLC) GetClock() uint64

func (*MessageLC) GetData

func (x *MessageLC) GetData() string

func (*MessageLC) GetId

func (x *MessageLC) GetId() string

func (*MessageLC) GetSrc

func (x *MessageLC) GetSrc() string

func (*MessageLC) GetType

func (x *MessageLC) GetType() MessageType

func (*MessageLC) ProtoMessage

func (*MessageLC) ProtoMessage()

func (*MessageLC) ProtoReflect

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

func (*MessageLC) Reset

func (x *MessageLC) Reset()

func (*MessageLC) String

func (x *MessageLC) String() string

type MessageQueueLCClient

type MessageQueueLCClient interface {
	Enqueue(ctx context.Context, in *MessageLC, opts ...grpc.CallOption) (*EnqueueReply, error)
}

MessageQueueLCClient is the client API for MessageQueueLC service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type MessageQueueLCServer

type MessageQueueLCServer interface {
	Enqueue(context.Context, *MessageLC) (*EnqueueReply, error)
	// contains filtered or unexported methods
}

MessageQueueLCServer is the server API for MessageQueueLC service. All implementations must embed UnimplementedMessageQueueLCServer for forward compatibility

type MessageType

type MessageType int32
const (
	MessageType_APPLICATION MessageType = 0
	MessageType_ACK         MessageType = 1
	MessageType_SYSTEM      MessageType = 2
)

func (MessageType) Descriptor

func (MessageType) Enum

func (x MessageType) Enum() *MessageType

func (MessageType) EnumDescriptor deprecated

func (MessageType) EnumDescriptor() ([]byte, []int)

Deprecated: Use MessageType.Descriptor instead.

func (MessageType) Number

func (x MessageType) Number() protoreflect.EnumNumber

func (MessageType) String

func (x MessageType) String() string

func (MessageType) Type

type UnimplementedMessageQueueLCServer

type UnimplementedMessageQueueLCServer struct {
}

UnimplementedMessageQueueLCServer must be embedded to have forward compatible implementations.

func (UnimplementedMessageQueueLCServer) Enqueue

type UnsafeMessageQueueLCServer

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

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

Jump to

Keyboard shortcuts

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