proto

package
v0.0.0-...-3c2cb95 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_template_proto protoreflect.FileDescriptor
View Source
var TimeSync_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.TimeSync",
	HandlerType: (*TimeSyncServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _TimeSync_Ping_Handler,
		},
		{
			MethodName: "GetTime",
			Handler:    _TimeSync_GetTime_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/template.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 Ack

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

func (*Ack) Descriptor deprecated

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

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) GetClientName

func (x *Ack) GetClientName() string

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

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

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type Time

type Time struct {
	T1 *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=T1,proto3" json:"T1,omitempty"`
	T2 *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=T2,proto3" json:"T2,omitempty"`
	// contains filtered or unexported fields
}

func (*Time) Descriptor deprecated

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

Deprecated: Use Time.ProtoReflect.Descriptor instead.

func (*Time) GetT1

func (x *Time) GetT1() *timestamppb.Timestamp

func (*Time) GetT2

func (x *Time) GetT2() *timestamppb.Timestamp

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

func (*Time) ProtoReflect

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

func (*Time) Reset

func (x *Time) Reset()

func (*Time) String

func (x *Time) String() string

type TimeSyncClient

type TimeSyncClient interface {
	Ping(ctx context.Context, in *Ack, opts ...grpc.CallOption) (*Ack, error)
	GetTime(ctx context.Context, in *Ack, opts ...grpc.CallOption) (*Time, 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 {
	Ping(context.Context, *Ack) (*Ack, error)
	GetTime(context.Context, *Ack) (*Time, 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

func (UnimplementedTimeSyncServer) Ping

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