mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Refactor util clock into it's own pkg
This commit is contained in:
		| @@ -36,14 +36,15 @@ import ( | ||||
| 	"k8s.io/kubernetes/pkg/runtime" | ||||
| 	"k8s.io/kubernetes/pkg/securitycontext" | ||||
| 	"k8s.io/kubernetes/pkg/util" | ||||
| 	"k8s.io/kubernetes/pkg/util/clock" | ||||
| 	"k8s.io/kubernetes/pkg/util/sets" | ||||
| 	utiltesting "k8s.io/kubernetes/pkg/util/testing" | ||||
| ) | ||||
|  | ||||
| // NewFakeControllerExpectationsLookup creates a fake store for PodExpectations. | ||||
| func NewFakeControllerExpectationsLookup(ttl time.Duration) (*ControllerExpectations, *util.FakeClock) { | ||||
| func NewFakeControllerExpectationsLookup(ttl time.Duration) (*ControllerExpectations, *clock.FakeClock) { | ||||
| 	fakeTime := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) | ||||
| 	fakeClock := util.NewFakeClock(fakeTime) | ||||
| 	fakeClock := clock.NewFakeClock(fakeTime) | ||||
| 	ttlPolicy := &cache.TTLPolicy{Ttl: ttl, Clock: fakeClock} | ||||
| 	ttlStore := cache.NewFakeExpirationStore( | ||||
| 		ExpKeyFunc, nil, ttlPolicy, fakeClock) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Harry Zhang
					Harry Zhang