Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 539 for New (0.15 sec)

  1. cmd/bitrot.go

    	HighwayHash256S: "highwayhash256S",
    }
    
    // New returns a new hash.Hash calculating the given bitrot algorithm.
    func (a BitrotAlgorithm) New() hash.Hash {
    	switch a {
    	case SHA256:
    		return sha256.New()
    	case BLAKE2b512:
    		b2, _ := blake2b.New512(nil) // New512 never returns an error if the key is nil
    		return b2
    	case HighwayHash256:
    		hh, _ := highwayhash.New(magicHighwayHash256Key) // New will never return error since key is 256 bit
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  2. cmd/site-replication.go

    		Cause: errors.New("site replication resync is already in progress"),
    		Code:  ErrSiteReplicationInvalidRequest,
    	}
    	errSRResyncCanceled = SRError{
    		Cause: errors.New("site replication resync is already canceled"),
    		Code:  ErrSiteReplicationInvalidRequest,
    	}
    	errSRNoResync = SRError{
    		Cause: errors.New("no resync in progress"),
    		Code:  ErrSiteReplicationInvalidRequest,
    	}
    	errSRResyncToSelf = SRError{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 184.2K bytes
    - Viewed (1)
  3. internal/bucket/bandwidth/measurement.go

    	startTime            time.Time // Start time for window
    	expMovingAvg         float64   // Previously calculate sliding window
    }
    
    // newBucketMeasurement creates a new instance of the measurement with the initial start time.
    func newBucketMeasurement(initTime time.Time) *bucketMeasurement {
    	return &bucketMeasurement{
    		startTime: initTime,
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Jun 03 20:41:51 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  4. cmd/net.go

    // such as, ":9000", "localhost:9000", "http://localhost:9000/"
    func extractHostPort(hostAddr string) (string, string, error) {
    	var addr, scheme string
    
    	if hostAddr == "" {
    		return "", "", errors.New("unable to process empty address")
    	}
    
    	// Simplify the work of url.Parse() and always send a url with
    	if !strings.HasPrefix(hostAddr, "http://") && !strings.HasPrefix(hostAddr, "https://") {
    		hostAddr = "//" + hostAddr
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  5. internal/config/api/api.go

    	if corsList == "" {
    		corsAllowOrigin = []string{"*"} // defaults to '*'
    	} else {
    		corsAllowOrigin = strings.Split(corsList, ",")
    		for _, cors := range corsAllowOrigin {
    			if cors == "" {
    				return cfg, errors.New("invalid cors value")
    			}
    		}
    	}
    	cfg.CorsAllowOrigin = corsAllowOrigin
    
    	if err = config.CheckValidKeys(config.APISubSys, kvs, DefaultKVS, deprecatedKeys...); err != nil {
    		return cfg, err
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 01:08:07 GMT 2024
    - 11.1K bytes
    - Viewed (1)
  6. internal/s3select/csv/reader.go

    		if r.args.FileHeaderInfo == use {
    			// Copy column names since records will be reused.
    			columns := append(make([]string, 0, len(record)), record...)
    			r.columnNames = columns
    		}
    	}
    
    	r.bufferPool.New = func() interface{} {
    		return make([]byte, csvSplitSize+1024)
    	}
    
    	// Return first block
    	next, nextErr := r.nextSplit(csvSplitSize, r.bufferPool.Get().([]byte))
    	// Check if first block is valid.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  7. cmd/api-errors_test.go

    	{err: crypto.ErrCustomerKeyMD5Mismatch, errCode: ErrSSECustomerKeyMD5Mismatch},
    	{err: errObjectTampered, errCode: ErrObjectTampered},
    
    	{err: nil, errCode: ErrNone},
    	{err: errors.New("Custom error"), errCode: ErrInternalError}, // Case where err type is unknown.
    }
    
    func TestAPIErrCode(t *testing.T) {
    	ctx := context.Background()
    	for i, testCase := range toAPIErrorTests {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 25 15:13:08 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  8. cmd/etcd.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"context"
    	"errors"
    	"fmt"
    
    	etcd "go.etcd.io/etcd/client/v3"
    )
    
    var errEtcdUnreachable = errors.New("etcd is unreachable, please check your endpoints")
    
    func etcdErrToErr(err error, etcdEndpoints []string) error {
    	if err == nil {
    		return nil
    	}
    	switch err {
    	case context.DeadlineExceeded:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  9. src/cmd/asm/main.go

    		ctxt.DiagFunc = func(format string, args ...interface{}) {
    			diag = true
    			log.Printf(format, args...)
    		}
    		if *flags.SymABIs {
    			ok = parser.ParseSymABIs(buf)
    		} else {
    			pList := new(obj.Plist)
    			pList.Firstpc, ok = parser.Parse()
    			// reports errors to parser.Errorf
    			if ok {
    				obj.Flushplist(ctxt, pList, nil)
    			}
    		}
    		if !ok {
    			failedFile = f
    			break
    		}
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/ztunnel/configdump/configdump.go

    func (c *ConfigWriter) PrintPodRootCAFromDynamicSecretDump() (string, error) {
    	// TODO
    	return "", nil
    }
    
    func (c *ConfigWriter) tabwriter() *tabwriter.Writer {
    	w := new(tabwriter.Writer).Init(c.Stdout, 0, 8, 1, ' ', 0)
    	return w
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 23 21:30:30 GMT 2024
    - 2.8K bytes
    - Viewed (0)
Back to top