- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for nowFunc (0.12 sec)
-
pkg/registry/core/persistentvolume/strategy_test.go
) } func TestStatusUpdate(t *testing.T) { now := metav1.Now() origin := metav1.NewTime(now.Add(time.Hour)) later := metav1.NewTime(now.Add(time.Hour * 2)) NowFunc = func() metav1.Time { return now } defer func() { NowFunc = metav1.Now }() tests := []struct { name string fg bool oldObj *api.PersistentVolume newObj *api.PersistentVolume
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 11K bytes - Viewed (0) -
pkg/kubelet/nodestatus/setters.go
func MemoryPressureCondition(nowFunc func() time.Time, // typically Kubelet.clock.Now pressureFunc func() bool, // typically Kubelet.evictionManager.IsUnderMemoryPressure recordEventFunc func(eventType, event string), // typically Kubelet.recordNodeStatusEvent ) Setter { return func(ctx context.Context, node *v1.Node) error { currentTime := metav1.NewTime(nowFunc()) var condition *v1.NodeCondition
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 12:12:04 UTC 2024 - 30.5K bytes - Viewed (0) -
callbacks/create.go
} } return called }) } } // ConvertToCreateValues convert to create values func ConvertToCreateValues(stmt *gorm.Statement) (values clause.Values) { curTime := stmt.DB.NowFunc() switch value := stmt.Dest.(type) { case map[string]interface{}: values = ConvertMapToValuesForCreate(stmt, value) case *map[string]interface{}: values = ConvertMapToValuesForCreate(stmt, *value)
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 08 03:29:55 UTC 2024 - 12.5K bytes - Viewed (0) -
tests/create_test.go
} func TestCreateWithNowFuncOverride(t *testing.T) { user := User{Name: "CreateUserTimestampOverride"} curTime := now.MustParse("2016-01-01") NEW := DB.Session(&gorm.Session{ NowFunc: func() time.Time { return curTime }, }) NEW.Save(&user) AssertEqual(t, user.CreatedAt, curTime) AssertEqual(t, user.UpdatedAt, curTime) var newUser User
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go
// we start the timer before we make the network call because kmsv2PluginWriteDEKSourceMaxTTL is meant to be the upper bound expirationTimestamp := envelopekmsv2.NowFunc().Add(kmsv2PluginWriteDEKSourceMaxTTL) // dynamically check if we want to use KDF seed to derive DEKs or just a single DEK // this gate can only change during tests, but the check is cheap enough to always make
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 16 16:56:39 UTC 2024 - 41.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go
enableWatchList bool expectedErr error }{ { name: "no newFunc provided", setupFn: func(opts *setupOptions) { opts.newFunc = nil }, requestOpts: storage.ListOptions{ProgressNotify: true}, expectedErr: apierrors.NewInternalError(errors.New("progressNotify for watch is unsupported by the etcd storage because no newFunc was provided")), }, } for _, scenario := range scenarios {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 12.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go
pathPrefix += "/" } w := &watcher{ client: c, codec: codec, newFunc: newFunc, groupResource: groupResource, versioner: versioner, transformer: transformer, } if newFunc == nil { w.objectType = "<unknown>" } else { w.objectType = reflect.TypeOf(newFunc()).String() } s := &store{ client: c, codec: codec,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 11:56:42 UTC 2024 - 35.2K bytes - Viewed (0) -
src/go/types/object.go
origin *Func // if non-nil, the Func from which this one was instantiated } // NewFunc returns a new function with the given signature, representing // the function's type. func NewFunc(pos token.Pos, pkg *Package, name string, sig *Signature) *Func { var typ Type if sig != nil { typ = sig } else { // Don't store a (typed) nil *Signature.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 20.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/object.go
origin *Func // if non-nil, the Func from which this one was instantiated } // NewFunc returns a new function with the given signature, representing // the function's type. func NewFunc(pos syntax.Pos, pkg *Package, name string, sig *Signature) *Func { var typ Type if sig != nil { typ = sig } else { // Don't store a (typed) nil *Signature.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 20.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go
var lockerType *types.Interface // Construct a sync.Locker interface type. func init() { nullary := types.NewSignature(nil, nil, nil, false) // func() methods := []*types.Func{ types.NewFunc(token.NoPos, nil, "Lock", nullary), types.NewFunc(token.NoPos, nil, "Unlock", nullary), } lockerType = types.NewInterface(methods, nil).Complete()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 9.9K bytes - Viewed (0)