feat: ntp service

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

No files matched your search

+8
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()