Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 212 for New (0.14 sec)

  1. internal/cachevalue/cache.go

    	valErr atomic.Pointer[struct {
    		v T
    		e error
    	}]
    	lastUpdateMs atomic.Int64
    	updating     sync.Mutex
    }
    
    // New allocates a new cached value instance. Tt must be initialized with
    // `.TnitOnce`.
    func New[T any]() *Cache[T] {
    	return &Cache[T]{}
    }
    
    // NewFromFunc allocates a new cached value instance and initializes it with an
    // update function, making it ready for use.
    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)
  2. cmd/config-current.go

    	}, nil
    }
    
    func newServerConfig() config.Config {
    	return config.New()
    }
    
    // newSrvConfig - initialize a new server config, saves env parameters if
    // found, otherwise use default parameters
    func newSrvConfig(objAPI ObjectLayer) error {
    	// Initialize server config.
    	srvCfg := newServerConfig()
    
    	// hold the mutex lock before a new config is assigned.
    	globalServerConfigMu.Lock()
    	globalServerConfig = srvCfg
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 30.8K bytes
    - Viewed (0)
  3. internal/grid/manager.go

    	TraceTo      *pubsub.PubSub[madmin.TraceInfo, madmin.TraceType]
    }
    
    // NewManager creates a new grid manager
    func NewManager(ctx context.Context, o ManagerOptions) (*Manager, error) {
    	found := false
    	if o.AuthRequest == nil {
    		return nil, fmt.Errorf("grid: AuthRequest must be set")
    	}
    	m := &Manager{
    		ID:          uuid.New(),
    		targets:     make(map[string]*Connection, len(o.Hosts)),
    		local:       o.Local,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  4. cmd/peer-rest-server.go

    	getPeerMetricsRPC              = grid.NewSingleHandler[*grid.MSS, *grid.Array[*MetricV2]](grid.HandlerGetPeerMetrics, grid.NewMSS, aoMetricsGroup.New)
    	getResourceMetricsRPC          = grid.NewSingleHandler[*grid.MSS, *grid.Array[*MetricV2]](grid.HandlerGetResourceMetrics, grid.NewMSS, aoMetricsGroup.New)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K bytes
    - Viewed (0)
  5. cmd/object-api-listobjects_test.go

    		{"test-bucket-list-object", "new", "", "", 3, resultCases[5], nil, true},
    		{"test-bucket-list-object", "new", "", "", 4, resultCases[5], nil, true},
    		{"test-bucket-list-object", "new", "", "", 5, resultCases[5], nil, true},
    		{"test-bucket-list-object", "obj", "", "", 3, resultCases[6], nil, true},
    		// Testing with prefix and truncation (27-28).
    		{"test-bucket-list-object", "new", "", "", 1, resultCases[7], nil, true},
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 11:07:40 GMT 2024
    - 73.1K bytes
    - Viewed (0)
  6. internal/rest/client.go

    				}
    			}
    			return nil, err
    		}
    		if len(b) > 0 {
    			return nil, errors.New(string(b))
    		}
    		return nil, errors.New(resp.Status)
    	}
    	if !c.NoMetrics {
    		resp.Body = &respBodyMonitor{ReadCloser: resp.Body, expectTimeouts: expectTimeouts}
    	}
    	return resp.Body, nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  7. internal/bpool/bpool.go

    // BytePoolCap implements a leaky pool of []byte in the form of a bounded channel.
    type BytePoolCap struct {
    	c    chan []byte
    	w    int
    	wcap int
    }
    
    // NewBytePoolCap creates a new BytePool bounded to the given maxSize, with new
    // byte arrays sized based on width.
    func NewBytePoolCap(maxSize uint64, width int, capwidth int) (bp *BytePoolCap) {
    	if capwidth > 0 && capwidth < 64 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  8. cmd/warm-backend-azure.go

    		credential azblob.Credential
    		err        error
    	)
    
    	switch {
    	case conf.AccountName == "":
    		return nil, errors.New("the account name is required")
    	case conf.AccountKey != "" && (conf.SPAuth.TenantID != "" || conf.SPAuth.ClientID != "" || conf.SPAuth.ClientSecret != ""):
    		return nil, errors.New("multiple authentication mechanisms are provided")
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 05 16:44:08 GMT 2024
    - 7.8K bytes
    - Viewed (1)
  9. cmd/warm-backend-minio.go

    	// Validation of credentials
    	if conf.AccessKey == "" || conf.SecretKey == "" {
    		return nil, errors.New("both access and secret keys are required")
    	}
    
    	if conf.Bucket == "" {
    		return nil, errors.New("no bucket name was provided")
    	}
    
    	u, err := url.Parse(conf.Endpoint)
    	if err != nil {
    		return nil, err
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. internal/grid/handlers.go

    // Any error seen on a remote will be returned like this.
    type RemoteErr string
    
    // NewRemoteErr creates a new remote error.
    // The error type is not preserved.
    func NewRemoteErr(err error) *RemoteErr {
    	if err == nil {
    		return nil
    	}
    	r := RemoteErr(err.Error())
    	return &r
    }
    
    // NewRemoteErrf creates a new remote error from a format string.
    func NewRemoteErrf(format string, a ...any) *RemoteErr {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 27.1K bytes
    - Viewed (0)
Back to top