gRPC

package
v0.0.0-...-172e57d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_message_proto protoreflect.FileDescriptor
View Source
var MessageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gRPC.MessageService",
	HandlerType: (*MessageServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Leave",
			Handler:    _MessageService_Leave_Handler,
		},
		{
			MethodName: "Entry",
			Handler:    _MessageService_Entry_Handler,
		},
		{
			MethodName: "resourceAccess",
			Handler:    _MessageService_ResourceAccess_Handler,
		},
		{
			MethodName: "Exit",
			Handler:    _MessageService_Exit_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Join",
			Handler:       _MessageService_Join_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "message.proto",
}

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

Functions

func RegisterMessageServiceServer

func RegisterMessageServiceServer(s grpc.ServiceRegistrar, srv MessageServiceServer)

Types

type AccessRequest

type AccessRequest struct {
	SendersName string `protobuf:"bytes,1,opt,name=senders_name,json=sendersName,proto3" json:"senders_name,omitempty"`
	LamportTime int64  `protobuf:"varint,2,opt,name=lamportTime,proto3" json:"lamportTime,omitempty"`
	// contains filtered or unexported fields
}

Access resource

func (*AccessRequest) Descriptor deprecated

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

Deprecated: Use AccessRequest.ProtoReflect.Descriptor instead.

func (*AccessRequest) GetLamportTime

func (x *AccessRequest) GetLamportTime() int64

func (*AccessRequest) GetSendersName

func (x *AccessRequest) GetSendersName() string

func (*AccessRequest) ProtoMessage

func (*AccessRequest) ProtoMessage()

func (*AccessRequest) ProtoReflect

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

func (*AccessRequest) Reset

func (x *AccessRequest) Reset()

func (*AccessRequest) String

func (x *AccessRequest) String() string

type AccessResponse

type AccessResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessResponse) Descriptor deprecated

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

Deprecated: Use AccessResponse.ProtoReflect.Descriptor instead.

func (*AccessResponse) GetStatus

func (x *AccessResponse) GetStatus() string

func (*AccessResponse) ProtoMessage

func (*AccessResponse) ProtoMessage()

func (*AccessResponse) ProtoReflect

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

func (*AccessResponse) Reset

func (x *AccessResponse) Reset()

func (*AccessResponse) String

func (x *AccessResponse) String() string

type EntryRequest

type EntryRequest struct {
	SendersName string `protobuf:"bytes,1,opt,name=senders_name,json=sendersName,proto3" json:"senders_name,omitempty"`
	LamportTime int64  `protobuf:"varint,2,opt,name=lamportTime,proto3" json:"lamportTime,omitempty"`
	// contains filtered or unexported fields
}

Entry

func (*EntryRequest) Descriptor deprecated

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

Deprecated: Use EntryRequest.ProtoReflect.Descriptor instead.

func (*EntryRequest) GetLamportTime

func (x *EntryRequest) GetLamportTime() int64

func (*EntryRequest) GetSendersName

func (x *EntryRequest) GetSendersName() string

func (*EntryRequest) ProtoMessage

func (*EntryRequest) ProtoMessage()

func (*EntryRequest) ProtoReflect

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

func (*EntryRequest) Reset

func (x *EntryRequest) Reset()

func (*EntryRequest) String

func (x *EntryRequest) String() string

type EntryResponse

type EntryResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*EntryResponse) Descriptor deprecated

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

Deprecated: Use EntryResponse.ProtoReflect.Descriptor instead.

func (*EntryResponse) GetStatus

func (x *EntryResponse) GetStatus() string

func (*EntryResponse) ProtoMessage

func (*EntryResponse) ProtoMessage()

func (*EntryResponse) ProtoReflect

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

func (*EntryResponse) Reset

func (x *EntryResponse) Reset()

func (*EntryResponse) String

func (x *EntryResponse) String() string

type ExitRequest

type ExitRequest struct {
	SendersName string `protobuf:"bytes,1,opt,name=senders_name,json=sendersName,proto3" json:"senders_name,omitempty"`
	LamportTime int64  `protobuf:"varint,2,opt,name=lamportTime,proto3" json:"lamportTime,omitempty"`
	// contains filtered or unexported fields
}

Exit

func (*ExitRequest) Descriptor deprecated

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

Deprecated: Use ExitRequest.ProtoReflect.Descriptor instead.

func (*ExitRequest) GetLamportTime

func (x *ExitRequest) GetLamportTime() int64

func (*ExitRequest) GetSendersName

func (x *ExitRequest) GetSendersName() string

func (*ExitRequest) ProtoMessage

func (*ExitRequest) ProtoMessage()

func (*ExitRequest) ProtoReflect

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

func (*ExitRequest) Reset

func (x *ExitRequest) Reset()

func (*ExitRequest) String

func (x *ExitRequest) String() string

type ExitResponse

type ExitResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ExitResponse) Descriptor deprecated

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

Deprecated: Use ExitResponse.ProtoReflect.Descriptor instead.

func (*ExitResponse) GetStatus

func (x *ExitResponse) GetStatus() string

func (*ExitResponse) ProtoMessage

func (*ExitResponse) ProtoMessage()

func (*ExitResponse) ProtoReflect

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

func (*ExitResponse) Reset

func (x *ExitResponse) Reset()

func (*ExitResponse) String

func (x *ExitResponse) String() string

type JoinRequest

type JoinRequest struct {
	SendersName string `protobuf:"bytes,1,opt,name=senders_name,json=sendersName,proto3" json:"senders_name,omitempty"`
	LamportTime int64  `protobuf:"varint,2,opt,name=lamportTime,proto3" json:"lamportTime,omitempty"`
	// contains filtered or unexported fields
}

Join

func (*JoinRequest) Descriptor deprecated

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

Deprecated: Use JoinRequest.ProtoReflect.Descriptor instead.

func (*JoinRequest) GetLamportTime

func (x *JoinRequest) GetLamportTime() int64

func (*JoinRequest) GetSendersName

func (x *JoinRequest) GetSendersName() string

func (*JoinRequest) ProtoMessage

func (*JoinRequest) ProtoMessage()

func (*JoinRequest) ProtoReflect

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

func (*JoinRequest) Reset

func (x *JoinRequest) Reset()

func (*JoinRequest) String

func (x *JoinRequest) String() string

type JoinResponse

type JoinResponse struct {
	Response    string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	LamportTime int64  `protobuf:"varint,2,opt,name=lamportTime,proto3" json:"lamportTime,omitempty"`
	// contains filtered or unexported fields
}

func (*JoinResponse) Descriptor deprecated

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

Deprecated: Use JoinResponse.ProtoReflect.Descriptor instead.

func (*JoinResponse) GetLamportTime

func (x *JoinResponse) GetLamportTime() int64

func (*JoinResponse) GetResponse

func (x *JoinResponse) GetResponse() string

func (*JoinResponse) ProtoMessage

func (*JoinResponse) ProtoMessage()

func (*JoinResponse) ProtoReflect

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

func (*JoinResponse) Reset

func (x *JoinResponse) Reset()

func (*JoinResponse) String

func (x *JoinResponse) String() string

type LeaveRequest

type LeaveRequest struct {
	SendersName string `protobuf:"bytes,1,opt,name=senders_name,json=sendersName,proto3" json:"senders_name,omitempty"`
	Status      string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

Leave

func (*LeaveRequest) Descriptor deprecated

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

Deprecated: Use LeaveRequest.ProtoReflect.Descriptor instead.

func (*LeaveRequest) GetSendersName

func (x *LeaveRequest) GetSendersName() string

func (*LeaveRequest) GetStatus

func (x *LeaveRequest) GetStatus() string

func (*LeaveRequest) ProtoMessage

func (*LeaveRequest) ProtoMessage()

func (*LeaveRequest) ProtoReflect

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

func (*LeaveRequest) Reset

func (x *LeaveRequest) Reset()

func (*LeaveRequest) String

func (x *LeaveRequest) String() string

type LeaveResponse

type LeaveResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*LeaveResponse) Descriptor deprecated

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

Deprecated: Use LeaveResponse.ProtoReflect.Descriptor instead.

func (*LeaveResponse) GetStatus

func (x *LeaveResponse) GetStatus() string

func (*LeaveResponse) ProtoMessage

func (*LeaveResponse) ProtoMessage()

func (*LeaveResponse) ProtoReflect

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

func (*LeaveResponse) Reset

func (x *LeaveResponse) Reset()

func (*LeaveResponse) String

func (x *LeaveResponse) String() string

type MessageServiceClient

type MessageServiceClient interface {
	Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (MessageService_JoinClient, error)
	Leave(ctx context.Context, in *LeaveRequest, opts ...grpc.CallOption) (*LeaveResponse, error)
	Entry(ctx context.Context, in *EntryRequest, opts ...grpc.CallOption) (*EntryResponse, error)
	ResourceAccess(ctx context.Context, in *AccessRequest, opts ...grpc.CallOption) (*AccessResponse, error)
	Exit(ctx context.Context, in *ExitRequest, opts ...grpc.CallOption) (*ExitResponse, error)
}

MessageServiceClient is the client API for MessageService 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 MessageServiceServer

type MessageServiceServer interface {
	Join(*JoinRequest, MessageService_JoinServer) error
	Leave(context.Context, *LeaveRequest) (*LeaveResponse, error)
	Entry(context.Context, *EntryRequest) (*EntryResponse, error)
	ResourceAccess(context.Context, *AccessRequest) (*AccessResponse, error)
	Exit(context.Context, *ExitRequest) (*ExitResponse, error)
	// contains filtered or unexported methods
}

MessageServiceServer is the server API for MessageService service. All implementations must embed UnimplementedMessageServiceServer for forward compatibility

type MessageService_JoinClient

type MessageService_JoinClient interface {
	Recv() (*JoinResponse, error)
	grpc.ClientStream
}

type MessageService_JoinServer

type MessageService_JoinServer interface {
	Send(*JoinResponse) error
	grpc.ServerStream
}

type UnimplementedMessageServiceServer

type UnimplementedMessageServiceServer struct {
}

UnimplementedMessageServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMessageServiceServer) Entry

func (UnimplementedMessageServiceServer) Exit

func (UnimplementedMessageServiceServer) Join

func (UnimplementedMessageServiceServer) Leave

func (UnimplementedMessageServiceServer) ResourceAccess

type UnsafeMessageServiceServer

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

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

Jump to

Keyboard shortcuts

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