ntp

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultUpdateInterval = 30 * time.Minute

Variables

This section is empty.

Functions

func SetSystemTime

func SetSystemTime(nowTime time.Time) error

Types

type NTPOptions

type NTPOptions struct {
	Server             string         `yaml:"server"`
	Interval           utils.Duration `yaml:"interval"`
	Upstream           string         `yaml:"upstream"`
	WriteToSystem      bool           `yaml:"write-to-system"`
	BasicDialerOptions basic.Options  `yaml:",inline"`
}

type NTPServer

type NTPServer struct {
	// contains filtered or unexported fields
}

func NewNTPServer

func NewNTPServer(ctx context.Context, core adapter.Core, logger log.Logger, options NTPOptions) (*NTPServer, error)

func (*NTPServer) Close

func (s *NTPServer) Close() error

func (*NTPServer) Start

func (s *NTPServer) Start() error

func (*NTPServer) TimeFunc

func (s *NTPServer) TimeFunc() func() time.Time

Jump to

Keyboard shortcuts

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