- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 170 for initializer (0.53 sec)
-
internal/cachevalue/cache.go
} // NewFromFunc allocates a new cached value instance and initializes it with an // update function, making it ready for use. func NewFromFunc[T any](ttl time.Duration, opts Opts, update func() (T, error)) *Cache[T] { return &Cache[T]{ ttl: ttl, updateFn: update, opts: opts, } } // InitOnce initializes the cache with a TTL and an update function. It is // guaranteed to be called only once.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Mar 01 16:00:42 GMT 2024 - 4.2K bytes - Viewed (0) -
cmd/typed-errors.go
var errInvalidRangeSource = errors.New("Range specified exceeds source object size") // error returned by disks which are to be initialized are waiting for the // first server to initialize them in distributed set to initialize them. var errNotFirstDisk = errors.New("Not first drive") // error returned by first disk waiting to initialize other servers. var errFirstDiskWait = errors.New("Waiting on other drives") // error returned for a negative actual size.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 5.3K bytes - Viewed (0) -
cmd/test-utils_test.go
return objLayer, formattedDisks, nil } // removeRoots - Cleans up initialized directories during tests. func removeRoots(roots []string) { for _, root := range roots { os.RemoveAll(root) } } // creates a bucket for the tests and returns the bucket name. // initializes the specified API endpoints for the tests. // initializes the root and returns its path. // return credentials.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri May 03 17:26:51 GMT 2024 - 76.2K bytes - Viewed (0) -
cmd/bucket-quota.go
cfg, _, err := globalBucketMetadataSys.GetQuotaConfig(ctx, bucketName) return cfg, err } // NewBucketQuotaSys returns initialized BucketQuotaSys func NewBucketQuotaSys() *BucketQuotaSys { return &BucketQuotaSys{} } var bucketStorageCache = cachevalue.New[DataUsageInfo]() // Init initialize bucket quota. func (sys *BucketQuotaSys) Init(objAPI ObjectLayer) { bucketStorageCache.InitOnce(10*time.Second,
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 4.3K bytes - Viewed (0) -
cmd/config.go
type ConfigSys struct{} // Init - initializes config system from config.json. func (sys *ConfigSys) Init(objAPI ObjectLayer) error { if objAPI == nil { return errInvalidArgument } return initConfig(objAPI) } // NewConfigSys - creates new config system object. func NewConfigSys() *ConfigSys { return &ConfigSys{} } // Initialize and load config from remote etcd or local config directory
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Aug 23 10:07:06 GMT 2023 - 6K bytes - Viewed (0) -
internal/dsync/dsync_test.go
testDrwMutexForceUnlockCallTimeout = 250 * time.Millisecond testDrwMutexRefreshInterval = 100 * time.Millisecond ) // TestMain initializes the testing framework func TestMain(m *testing.M) { startLockServers() // Initialize locker clients for dsync. var clnts []NetLocker for i := 0; i < len(nodes); i++ { clnts = append(clnts, newClient(nodes[i].URL)) } ds = &Dsync{
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sat Dec 24 03:49:07 GMT 2022 - 11K bytes - Viewed (0) -
cmd/bucket-replication.go
// a synchronous manner. func mustReplicate(ctx context.Context, bucket, object string, mopts mustReplicateOptions) (dsc ReplicateDecision) { // object layer not initialized we return with no decision. if newObjectLayerFn() == nil { return } // Disable server-side replication on object prefixes which are excluded // from versioning via the MinIO bucket versioning extension.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed May 01 01:09:56 GMT 2024 - 112.2K bytes - Viewed (1) -
internal/config/storageclass/storage-class.go
// // -- if input storage class is empty then standard is assumed // // -- if input is RRS but RRS is not configured/initialized '-1' parity // // for RRS is assumed, the caller is expected to choose the right parity // at that point. // // -- if input is STANDARD but STANDARD is not configured/initialized '-1' parity // // is returned, the caller is expected to choose the right parity // at that point.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 11.8K bytes - Viewed (0) -
tests/upsert_test.go
} if user1.Name != "find or init" || user1.ID != 0 || user1.Age != 33 { t.Errorf("user should be initialized with search value") } DB.Where(User{Name: "find or init", Age: 33}).FirstOrInit(&user2) if user2.Name != "find or init" || user2.ID != 0 || user2.Age != 33 { t.Errorf("user should be initialized with search value") } DB.FirstOrInit(&user3, map[string]interface{}{"name": "find or init 2"})
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Sep 05 07:39:19 GMT 2022 - 11.4K bytes - Viewed (0) -
cmd/erasure-sets_test.go
nDisks := 16 // Maximum disks. var erasureDisks []string for i := 0; i < nDisks; i++ { // Do not attempt to create this path, the test validates // so that newErasureSets initializes non existing paths // and successfully returns initialized object layer. disk := filepath.Join(globalTestTmpDir, "minio-"+nextSuffix()) erasureDisks = append(erasureDisks, disk) defer os.RemoveAll(disk) }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Feb 12 07:21:56 GMT 2024 - 6.9K bytes - Viewed (0)