Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 121 for Sanic (0.01 sec)

  1. cmd/xl-storage-format_test.go

    	return xlMeta
    }
    
    func (m *xlMetaV1Object) AddTestObjectCheckSum(partNumber int, algorithm BitrotAlgorithm, hash string) {
    	checksum, err := hex.DecodeString(hash)
    	if err != nil {
    		panic(err)
    	}
    	m.Erasure.Checksums[partNumber-1] = ChecksumInfo{partNumber, algorithm, checksum}
    }
    
    // AddTestObjectPart - add a new object part in order.
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 17.5K bytes
    - Viewed (0)
  2. internal/hash/crc.go

    	for vec != 0 {
    		if vec&1 != 0 {
    			sum ^= mat[0]
    		}
    		vec >>= 1
    		mat = mat[1:]
    	}
    	return sum
    }
    
    func gf2MatrixSquare(square, mat []uint64) {
    	if len(square) != len(mat) {
    		panic("square matrix size mismatch")
    	}
    	for n := range mat {
    		square[n] = gf2MatrixTimes(mat, mat[n])
    	}
    }
    
    // crc32Combine returns the combined CRC-32 hash value of the two passed CRC-32
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Mon Jan 20 14:49:07 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  3. internal/etag/etag_test.go

    		}
    		if !Equal(etag, test.Plaintext) {
    			t.Fatalf("Test %d: got '%v' - want '%v'", i, etag, test.Plaintext)
    		}
    	}
    }
    
    func must(s string) ETag {
    	t, err := Parse(s)
    	if err != nil {
    		panic(err)
    	}
    	return t
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Wed Apr 09 14:28:39 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  4. docs/distributed/DESIGN.md

                    if atTotal > choose && pool.Available > 0 {
                            return pool.Index
                    }
            }
            // Should not happen, but print values just in case.
            panic(fmt.Errorf("reached end of serverPools (total: %v, atTotal: %v, choose: %v)", total, atTotal, choose))
    }
    ```
    
    ## Other usages
    
    ### Advanced use cases with multiple ellipses
    
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Wed Feb 26 09:25:50 UTC 2025
    - 8K bytes
    - Viewed (2)
  5. internal/s3select/sql/value_test.go

    	},
    	func() *Value {
    		return FromFloat(math.Pi)
    	},
    	func() *Value {
    		return FromInt(0x1337)
    	},
    	func() *Value {
    		t, err := time.Parse(time.RFC3339, "2006-01-02T15:04:05Z")
    		if err != nil {
    			panic(err)
    		}
    		return FromTimestamp(t)
    	},
    	func() *Value {
    		return FromString("string contents")
    	},
    }
    
    // altValueBuilders contains one constructor for each value type.
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  6. internal/crypto/metadata_test.go

    		}
    	}
    
    	defer func() {
    		if err := recover(); err == nil || err != logger.ErrCritical {
    			t.Errorf("Expected '%s' panic for invalid seal algorithm but got '%s'", logger.ErrCritical, err)
    		}
    	}()
    	_ = S3.CreateMetadata(nil, "", []byte{}, SealedKey{Algorithm: InsecureSealAlgorithm})
    }
    
    var ssecCreateMetadataTests = []struct {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  7. cmd/format-erasure.go

    		drives += len(set)
    	}
    	return drives
    }
    
    func (f *formatErasureV3) Clone() *formatErasureV3 {
    	b, err := json.Marshal(f)
    	if err != nil {
    		panic(err)
    	}
    	var dst formatErasureV3
    	if err = json.Unmarshal(b, &dst); err != nil {
    		panic(err)
    	}
    	return &dst
    }
    
    // Returns formatErasure.Erasure.Version
    func newFormatErasureV3(numSets int, setLen int) *formatErasureV3 {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 23.1K bytes
    - Viewed (0)
  8. cmd/erasure-encode_test.go

    		}
    		_, err := erasure.Encode(context.Background(), bytes.NewReader(content), writers, buffer, erasure.dataBlocks+1)
    		closeBitrotWriters(writers)
    		if err != nil {
    			panic(err)
    		}
    	}
    }
    
    func BenchmarkErasureEncodeQuick(b *testing.B) {
    	const size = 12 * 1024 * 1024
    	b.Run(" 00|00 ", func(b *testing.B) { benchmarkErasureEncode(2, 2, 0, 0, size, b) })
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  9. internal/grid/handlers.go

    	peerPrefixS3    = "peerS3"
    	healPrefix      = "heal"
    )
    
    func init() {
    	// Static check if we exceed 255 handler ids.
    	// Extend the type to uint16 when hit.
    	if uint32(handlerLast) > 255 {
    		panic(fmt.Sprintf("out of handler IDs. %d > %d", handlerLast, 255))
    	}
    }
    
    func (h HandlerID) valid() bool {
    	return h != handlerInvalid && h < handlerLast
    }
    
    func (h HandlerID) isTestHandler() bool {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Tue Feb 18 16:25:55 UTC 2025
    - 27.7K bytes
    - Viewed (0)
  10. finisher_api.go

    				// Make sure to rollback when panic, Block error or Commit error
    				if panicked || err != nil {
    					db.RollbackTo(fmt.Sprintf("sp%d", spID))
    				}
    			}()
    		}
    		err = fc(db.Session(&Session{NewDB: db.clone == 1}))
    	} else {
    		tx := db.Begin(opts...)
    		if tx.Error != nil {
    			return tx.Error
    		}
    
    		defer func() {
    			// Make sure to rollback when panic, Block error or Commit error
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Fri Sep 19 01:49:06 UTC 2025
    - 22.9K bytes
    - Viewed (0)
Back to top