Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 539 for New (0.18 sec)

  1. cmd/hasher.go

    }
    
    // getSHA256Hash returns SHA-256 sum of given data.
    func getSHA256Sum(data []byte) []byte {
    	hash := sha256.New()
    	hash.Write(data)
    	return hash.Sum(nil)
    }
    
    // getMD5Sum returns MD5 sum of given data.
    func getMD5Sum(data []byte) []byte {
    	hash := md5.New()
    	hash.Write(data)
    	return hash.Sum(nil)
    }
    
    // getMD5Hash returns MD5 hash in hex encoding of given data.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 27 13:00:19 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  2. tests/upsert_test.go

    	}
    
    	lang3 := Language{Code: "upsert", Name: "Upsert"}
    	if err := DB.Clauses(clause.OnConflict{
    		Columns:   []clause.Column{{Name: "code"}},
    		DoUpdates: clause.Assignments(map[string]interface{}{"name": "upsert-new"}),
    	}).Create(&lang3).Error; err != nil {
    		t.Fatalf("failed to upsert, got %v", err)
    	}
    
    	if err := DB.Find(&langs, "code = ?", lang.Code).Error; err != nil {
    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)
  3. cmd/config.go

    }
    
    // data is optional. If nil it will be loaded from backend.
    func readServerConfig(ctx context.Context, objAPI ObjectLayer, data []byte) (config.Config, error) {
    	srvCfg := config.New()
    	var err error
    	if len(data) == 0 {
    		configFile := path.Join(minioConfigPrefix, minioConfigFile)
    		data, err = readConfig(ctx, objAPI, configFile)
    		if err != nil {
    			if errors.Is(err, errConfigNotFound) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Aug 23 10:07:06 GMT 2023
    - 6K bytes
    - Viewed (0)
  4. internal/http/listener.go

    	acceptCh    chan acceptResult // channel where all TCP listeners write accepted connection.
    	ctx         context.Context
    	ctxCanceler context.CancelFunc
    }
    
    // start - starts separate goroutine for each TCP listener.  A valid new connection is passed to httpListener.acceptCh.
    func (listener *httpListener) start() {
    	// Closure to send acceptResult to acceptCh.
    	// It returns true if the result is sent else false if returns when doneCh is closed.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. cmd/test-utils_test.go

    	randmu sync.Mutex
    )
    
    // Temp files created in default Tmp dir
    var globalTestTmpDir = os.TempDir()
    
    // reseed - returns a new seed every time the function is called.
    func reseed() uint32 {
    	return uint32(time.Now().UnixNano() + int64(os.Getpid()))
    }
    
    // nextSuffix - provides a new unique suffix every time the function is called.
    func nextSuffix() string {
    	randmu.Lock()
    	r := randN
    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)
  6. internal/config/cache/cache.go

    }
    
    // Update updates new cache frequency
    func (c *Config) Update(ncfg Config) {
    	configLock.Lock()
    	defer configLock.Unlock()
    
    	c.Enable = ncfg.Enable
    	c.Endpoint = ncfg.Endpoint
    	c.BlockSize = ncfg.BlockSize
    	c.clnt = ncfg.clnt
    }
    
    // cache related errors
    var (
    	ErrInvalidArgument = errors.New("invalid argument")
    	ErrKeyMissing      = errors.New("key is missing")
    )
    
    const (
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  7. src/bufio/scan.go

    // Errors returned by Scanner.
    var (
    	ErrTooLong         = errors.New("bufio.Scanner: token too long")
    	ErrNegativeAdvance = errors.New("bufio.Scanner: SplitFunc returns negative advance count")
    	ErrAdvanceTooFar   = errors.New("bufio.Scanner: SplitFunc returns advance count beyond input")
    	ErrBadReadCount    = errors.New("bufio.Scanner: Read returned impossible count")
    )
    
    const (
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  8. internal/config/subnet/subnet.go

    	LoggerWebhookName = "subnet"
    )
    
    // Upload given file content (payload) to specified URL
    func (c Config) Upload(reqURL string, filename string, payload []byte) (string, error) {
    	if !c.Registered() {
    		return "", errors.New("Deployment is not registered with SUBNET. Please register the deployment via 'mc license register ALIAS'")
    	}
    
    	var body bytes.Buffer
    	writer := multipart.NewWriter(&body)
    	part, e := writer.CreateFormFile("file", filename)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 27 16:35:36 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/server_test.go

    	podIP := netip.MustParseAddr("99.9.9.1")
    	podIPs := []netip.Addr{podIP}
    	fakeCtx := context.Background()
    
    	server.On("AddPodToMesh",
    		fakeCtx,
    		pod,
    		podIPs,
    		"",
    	).Return(errors.New("not partial error"))
    
    	server.Start(fakeCtx)
    	fakeClientSet := fake.NewSimpleClientset(pod)
    	m := meshDataplane{
    		kubeClient: fakeClientSet,
    		netServer:  server,
    	}
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  10. internal/hash/reader.go

    	if len(SHA256) != 0 {
    		h = sha256.New()
    	}
    	return &Reader{
    		src:           src,
    		size:          size,
    		actualSize:    actualSize,
    		checksum:      MD5,
    		contentSHA256: SHA256,
    		sha256:        h,
    		disableMD5:    disableMD5,
    	}, nil
    }
    
    // ErrInvalidChecksum is returned when an invalid checksum is provided in headers.
    var ErrInvalidChecksum = errors.New("invalid checksum")
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.8K bytes
    - Viewed (0)
Back to top