time

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_time_time_proto protoreflect.FileDescriptor

Functions

func RegisterTimeServiceServer

func RegisterTimeServiceServer(s *grpc.Server, srv TimeServiceServer)

Types

type Time

type Time struct {
	Metadata   *common.Metadata     `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Server     string               `protobuf:"bytes,2,opt,name=server,proto3" json:"server,omitempty"`
	Localtime  *timestamp.Timestamp `protobuf:"bytes,3,opt,name=localtime,proto3" json:"localtime,omitempty"`
	Remotetime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=remotetime,proto3" json:"remotetime,omitempty"`
	// contains filtered or unexported fields
}

func (*Time) Descriptor deprecated

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

Deprecated: Use Time.ProtoReflect.Descriptor instead.

func (*Time) GetLocaltime

func (x *Time) GetLocaltime() *timestamp.Timestamp

func (*Time) GetMetadata

func (x *Time) GetMetadata() *common.Metadata

func (*Time) GetRemotetime

func (x *Time) GetRemotetime() *timestamp.Timestamp

func (*Time) GetServer

func (x *Time) GetServer() string

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

func (*Time) ProtoReflect added in v0.6.0

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

func (*Time) Reset

func (x *Time) Reset()

func (*Time) String

func (x *Time) String() string

type TimeRequest

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

The response message containing the ntp server

func (*TimeRequest) Descriptor deprecated

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

Deprecated: Use TimeRequest.ProtoReflect.Descriptor instead.

func (*TimeRequest) GetServer

func (x *TimeRequest) GetServer() string

func (*TimeRequest) ProtoMessage

func (*TimeRequest) ProtoMessage()

func (*TimeRequest) ProtoReflect added in v0.6.0

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

func (*TimeRequest) Reset

func (x *TimeRequest) Reset()

func (*TimeRequest) String

func (x *TimeRequest) String() string

type TimeResponse

type TimeResponse struct {
	Messages []*Time `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

The response message containing the ntp server, time, and offset

func (*TimeResponse) Descriptor deprecated

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

Deprecated: Use TimeResponse.ProtoReflect.Descriptor instead.

func (*TimeResponse) GetMessages

func (x *TimeResponse) GetMessages() []*Time

func (*TimeResponse) ProtoMessage

func (*TimeResponse) ProtoMessage()

func (*TimeResponse) ProtoReflect added in v0.6.0

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

func (*TimeResponse) Reset

func (x *TimeResponse) Reset()

func (*TimeResponse) String

func (x *TimeResponse) String() string

type TimeServiceClient

type TimeServiceClient interface {
	Time(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TimeResponse, error)
	TimeCheck(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeResponse, error)
}

TimeServiceClient is the client API for TimeService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type TimeServiceServer

type TimeServiceServer interface {
	Time(context.Context, *empty.Empty) (*TimeResponse, error)
	TimeCheck(context.Context, *TimeRequest) (*TimeResponse, error)
}

TimeServiceServer is the server API for TimeService service.

type UnimplementedTimeServiceServer added in v0.6.0

type UnimplementedTimeServiceServer struct {
}

UnimplementedTimeServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedTimeServiceServer) Time added in v0.6.0

func (*UnimplementedTimeServiceServer) TimeCheck added in v0.6.0

Jump to

Keyboard shortcuts

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