time

package
v0.5.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Time) Descriptor

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

func (*Time) GetLocaltime

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

func (*Time) GetMetadata

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

func (*Time) GetRemotetime

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

func (*Time) GetServer

func (m *Time) GetServer() string

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

func (*Time) Reset

func (m *Time) Reset()

func (*Time) String

func (m *Time) String() string

func (*Time) XXX_DiscardUnknown

func (m *Time) XXX_DiscardUnknown()

func (*Time) XXX_Marshal

func (m *Time) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Time) XXX_Merge

func (m *Time) XXX_Merge(src proto.Message)

func (*Time) XXX_Size

func (m *Time) XXX_Size() int

func (*Time) XXX_Unmarshal

func (m *Time) XXX_Unmarshal(b []byte) error

type TimeRequest

type TimeRequest struct {
	Server               string   `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The response message containing the ntp server

func (*TimeRequest) Descriptor

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

func (*TimeRequest) GetServer

func (m *TimeRequest) GetServer() string

func (*TimeRequest) ProtoMessage

func (*TimeRequest) ProtoMessage()

func (*TimeRequest) Reset

func (m *TimeRequest) Reset()

func (*TimeRequest) String

func (m *TimeRequest) String() string

func (*TimeRequest) XXX_DiscardUnknown

func (m *TimeRequest) XXX_DiscardUnknown()

func (*TimeRequest) XXX_Marshal

func (m *TimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeRequest) XXX_Merge

func (m *TimeRequest) XXX_Merge(src proto.Message)

func (*TimeRequest) XXX_Size

func (m *TimeRequest) XXX_Size() int

func (*TimeRequest) XXX_Unmarshal

func (m *TimeRequest) XXX_Unmarshal(b []byte) error

type TimeResponse

type TimeResponse struct {
	Messages             []*Time  `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*TimeResponse) Descriptor

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

func (*TimeResponse) GetMessages

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

func (*TimeResponse) ProtoMessage

func (*TimeResponse) ProtoMessage()

func (*TimeResponse) Reset

func (m *TimeResponse) Reset()

func (*TimeResponse) String

func (m *TimeResponse) String() string

func (*TimeResponse) XXX_DiscardUnknown

func (m *TimeResponse) XXX_DiscardUnknown()

func (*TimeResponse) XXX_Marshal

func (m *TimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeResponse) XXX_Merge

func (m *TimeResponse) XXX_Merge(src proto.Message)

func (*TimeResponse) XXX_Size

func (m *TimeResponse) XXX_Size() int

func (*TimeResponse) XXX_Unmarshal

func (m *TimeResponse) XXX_Unmarshal(b []byte) error

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.

func NewTimeServiceClient

func NewTimeServiceClient(cc *grpc.ClientConn) TimeServiceClient

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.

Jump to

Keyboard shortcuts

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