feat: edge gateway service
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Package clock provides the gateway time source abstraction used by
|
||||
// authenticated transport checks.
|
||||
package clock
|
||||
|
||||
import "time"
|
||||
|
||||
// Clock returns current server time for freshness checks and time-dependent
|
||||
// transport behavior.
|
||||
type Clock interface {
|
||||
// Now returns the current server time.
|
||||
Now() time.Time
|
||||
}
|
||||
|
||||
// System returns the current process time using the local system clock.
|
||||
type System struct{}
|
||||
|
||||
// Now returns the current UTC time from the system clock.
|
||||
func (System) Now() time.Time {
|
||||
return time.Now().UTC()
|
||||
}
|
||||
Reference in New Issue
Block a user