Skip to content

Commit

Permalink
proxy: imp docs
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Dec 14, 2023
1 parent 62d9b57 commit 932f00f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion proxy/clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ package proxy

import "time"

// Clock is the interface for current time provider. Its used to simplify
// Clock is the interface for provider of current time. It's used to simplify
// testing.
//
// TODO(e.burkov): Move to golibs.
type Clock interface {
// Now returns the current local time.
Now() (now time.Time)
}

// type check
var _ Clock = RealClock{}

// RealClock is the [Clock] which actually uses the [time] package.
type RealClock struct{}

Expand Down

0 comments on commit 932f00f

Please sign in to comment.