rpc_exercise

package
v0.0.0-...-14e5124 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_timeSync_timeSync_proto protoreflect.FileDescriptor
View Source
var TimeSync_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "timeSync.TimeSync",
	HandlerType: (*TimeSyncServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTime",
			Handler:    _TimeSync_GetTime_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "timeSync/timeSync.proto",
}

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

Functions

func RegisterTimeSyncServer

func RegisterTimeSyncServer(s grpc.ServiceRegistrar, srv TimeSyncServer)

Types

type CurrentTime

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

func (*CurrentTime) Descriptor deprecated

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

Deprecated: Use CurrentTime.ProtoReflect.Descriptor instead.

func (*CurrentTime) GetT1

func (x *CurrentTime) GetT1() string

func (*CurrentTime) ProtoMessage

func (*CurrentTime) ProtoMessage()

func (*CurrentTime) ProtoReflect

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

func (*CurrentTime) Reset

func (x *CurrentTime) Reset()

func (*CurrentTime) String

func (x *CurrentTime) String() string

type RequestedTime

type RequestedTime struct {
	T1 string `protobuf:"bytes,1,opt,name=t1,proto3" json:"t1,omitempty"`
	T2 string `protobuf:"bytes,2,opt,name=t2,proto3" json:"t2,omitempty"`
	T3 string `protobuf:"bytes,3,opt,name=t3,proto3" json:"t3,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestedTime) Descriptor deprecated

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

Deprecated: Use RequestedTime.ProtoReflect.Descriptor instead.

func (*RequestedTime) GetT1

func (x *RequestedTime) GetT1() string

func (*RequestedTime) GetT2

func (x *RequestedTime) GetT2() string

func (*RequestedTime) GetT3

func (x *RequestedTime) GetT3() string

func (*RequestedTime) ProtoMessage

func (*RequestedTime) ProtoMessage()

func (*RequestedTime) ProtoReflect

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

func (*RequestedTime) Reset

func (x *RequestedTime) Reset()

func (*RequestedTime) String

func (x *RequestedTime) String() string

type TimeSyncClient

type TimeSyncClient interface {
	GetTime(ctx context.Context, in *CurrentTime, opts ...grpc.CallOption) (*RequestedTime, error)
}

TimeSyncClient is the client API for TimeSync 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.

func NewTimeSyncClient

func NewTimeSyncClient(cc grpc.ClientConnInterface) TimeSyncClient

type TimeSyncServer

type TimeSyncServer interface {
	GetTime(context.Context, *CurrentTime) (*RequestedTime, error)
	// contains filtered or unexported methods
}

TimeSyncServer is the server API for TimeSync service. All implementations must embed UnimplementedTimeSyncServer for forward compatibility

type UnimplementedTimeSyncServer

type UnimplementedTimeSyncServer struct {
}

UnimplementedTimeSyncServer must be embedded to have forward compatible implementations.

func (UnimplementedTimeSyncServer) GetTime

type UnsafeTimeSyncServer

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

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

Jump to

Keyboard shortcuts

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