feat: ntp service

This commit is contained in:
cubemaze
2023-08-26 11:38:18 +08:00
parent bb16015dab
commit 1aa0b2a8e1
3 changed files with 27 additions and 0 deletions

View File

@@ -59,6 +59,14 @@ func New(c *conf.CoreConfig) (vCore.Core, error) {
Timestamp: c.SingConfig.LogConfig.Timestamp,
Output: c.SingConfig.LogConfig.Output,
}
options.NTP = &option.NTPOptions{
Enabled: c.SingConfig.NtpConfig.Enable,
WriteToSystem: true,
ServerOptions: option.ServerOptions{
Server: c.SingConfig.NtpConfig.Server,
ServerPort: c.SingConfig.NtpConfig.ServerPort,
},
}
ctx := context.Background()
ctx = pause.ContextWithDefaultManager(ctx)
createdAt := time.Now()