- Sort Score
- Result 10 results
- Languages All
Results 151 - 160 of 1,425 for Func (0.02 sec)
-
internal/logger/logger.go
var ( quietFlag, jsonFlag, anonFlag bool // Custom function to format error errorFmtFunc func(string, error, bool) string ) // EnableQuiet - turns quiet option on. func EnableQuiet() { color.TurnOff() // no colored outputs necessary in quiet mode. quietFlag = true } // EnableJSON - outputs logs in json format. func EnableJSON() { color.TurnOff() // no colored outputs necessary in JSON mode. jsonFlag = true
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 22 09:43:48 UTC 2024 - 12.4K bytes - Viewed (0) -
cmd/erasure-metadata.go
// GetChecksumInfo - get checksum of a part. func (e ErasureInfo) GetChecksumInfo(partNumber int) (ckSum ChecksumInfo) { for _, sum := range e.Checksums { if sum.PartNumber == partNumber { // Return the checksum return sum } } return ChecksumInfo{Algorithm: DefaultBitrotAlgorithm} } // ShardFileSize - returns final erasure size from original size. func (e ErasureInfo) ShardFileSize(totalLength int64) int64 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 21.3K bytes - Viewed (0) -
internal/bucket/replication/replication.go
ExistingObjectReplicationType ResyncReplicationType AllReplicationType ) // Valid returns true if replication type is set func (t Type) Valid() bool { return t > 0 } // IsDataReplication returns true if content being replicated func (t Type) IsDataReplication() bool { switch t { case ObjectReplicationType, HealReplicationType, ExistingObjectReplicationType: return true }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 28 17:44:56 UTC 2024 - 8.9K bytes - Viewed (0) -
cni/test/install_cni.go
} t.Logf("Created temporary dir: %v", tempDir) return tempDir } func ls(dir string, t *testing.T) []string { files, err := os.ReadDir(dir) t.Helper() if err != nil { t.Fatalf("Failed to list files, err: %v", err) } return slices.Map(files, func(e os.DirEntry) string { return e.Name() }) } func cp(src, dest string, t *testing.T) { t.Helper() data, err := os.ReadFile(src)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 01 18:38:14 UTC 2024 - 11.3K bytes - Viewed (0) -
cmd/common-main.go
// This can be used for goroutines that live beyond the parent context. func bgContext(parent context.Context) context.Context { return bgCtx{parent: parent} } type bgCtx struct { parent context.Context } func (a bgCtx) Done() <-chan struct{} { return nil } func (a bgCtx) Err() error { return nil } func (a bgCtx) Deadline() (deadline time.Time, ok bool) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 21:50:11 UTC 2024 - 31.7K bytes - Viewed (0) -
chainable_api.go
// } // // func OrderStatus(status []string) func (db *gorm.DB) *gorm.DB { // return func (db *gorm.DB) *gorm.DB { // return db.Scopes(AmountGreaterThan1000).Where("status in (?)", status) // } // } // // db.Scopes(AmountGreaterThan1000, OrderStatus([]string{"paid", "shipped"})).Find(&orders) func (db *DB) Scopes(funcs ...func(*DB) *DB) (tx *DB) { tx = db.getInstance()
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 14.8K bytes - Viewed (0) -
internal/dsync/dsync-server_test.go
responseDelay int64 } func (l *lockServer) setRefreshReply(refreshed bool) { l.mutex.Lock() defer l.mutex.Unlock() l.lockNotFound = !refreshed } func (l *lockServer) setResponseDelay(responseDelay time.Duration) { atomic.StoreInt64(&l.responseDelay, int64(responseDelay)) } func (l *lockServer) Lock(args *LockArgs) (reply bool, err error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jan 23 16:46:37 UTC 2023 - 8.3K bytes - Viewed (0) -
src/bytes/reader.go
// slice. func (r *Reader) Len() int { if r.i >= int64(len(r.s)) { return 0 } return int(int64(len(r.s)) - r.i) } // Size returns the original length of the underlying byte slice. // Size is the number of bytes available for reading via [Reader.ReadAt]. // The result is unaffected by any method calls except [Reader.Reset]. func (r *Reader) Size() int64 { return int64(len(r.s)) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Jul 16 18:17:37 UTC 2024 - 3.9K bytes - Viewed (0) -
utils/utils_test.go
"errors" "math" "strings" "testing" "time" ) func TestIsValidDBNameChar(t *testing.T) { for _, db := range []string{"db", "dbName", "db_name", "db1", "1dbname", "db$name"} { if fields := strings.FieldsFunc(db, IsValidDBNameChar); len(fields) != 1 { t.Fatalf("failed to parse db name %v", db) } } } func TestCheckTruth(t *testing.T) { checkTruthTests := []struct { v string out bool
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 4.9K bytes - Viewed (0) -
internal/config/identity/openid/provider/keycloak.go
func WithAdminURL(url string) Option { return func(p *KeycloakProvider) { p.adminURL = url } } // WithRealm provide realm configuration for Keycloak func WithRealm(realm string) Option { return func(p *KeycloakProvider) { p.realm = realm } } // KeyCloak initializes a new keycloak provider func KeyCloak(opts ...Option) (Provider, error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jul 14 18:12:07 UTC 2024 - 4.6K bytes - Viewed (0)