Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 196 for New (0.13 sec)

  1. internal/grid/types.go

    	ePool sync.Pool // Elements
    }
    
    // NewArrayOf returns a new ArrayOf.
    // You must provide a function that returns a new instance of T.
    func NewArrayOf[T RoundTripper](newFn func() T) *ArrayOf[T] {
    	return &ArrayOf[T]{
    		ePool: sync.Pool{New: func() any {
    			return newFn()
    		}},
    	}
    }
    
    // New returns a new empty Array.
    func (p *ArrayOf[T]) New() *Array[T] {
    	return &Array[T]{
    		p: p,
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  2. internal/event/target/nats.go

    		return errors.New("username and password must be specified as a pair")
    	}
    
    	if n.Streaming.Enable {
    		if n.Streaming.ClusterID == "" {
    			return errors.New("empty cluster id")
    		}
    	}
    
    	if n.JetStream.Enable {
    		if n.Subject == "" {
    			return errors.New("empty subject")
    		}
    	}
    
    	if n.QueueDir != "" {
    		if !filepath.IsAbs(n.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Feb 27 18:11:55 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  3. cmd/storage-errors.go

    var errDoneForNow = errors.New("done for now")
    
    // errSkipFile returned by the fn() for readDirFn() when it needs
    // to proceed to next entry.
    var errSkipFile = errors.New("skip this file")
    
    var errIgnoreFileContrib = errors.New("ignore this file's contribution toward data-usage")
    
    // errXLBackend XL drive mode requires fresh deployment.
    var errXLBackend = errors.New("XL backend requires fresh drive")
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. cmd/erasure-common.go

    	"sync"
    	"time"
    
    	"github.com/minio/pkg/v2/sync/errgroup"
    )
    
    func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) {
    	disks := er.getDisks()
    	var wg sync.WaitGroup
    	var mu sync.Mutex
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    	for _, i := range r.Perm(len(disks)) {
    		i := i
    		wg.Add(1)
    		go func() {
    			defer wg.Done()
    			if disks[i] == nil {
    				return
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  5. internal/hash/checksum.go

    	case c.Is(ChecksumCRC32C):
    		return crc32.New(crc32.MakeTable(crc32.Castagnoli))
    	case c.Is(ChecksumSHA1):
    		return sha1.New()
    	case c.Is(ChecksumSHA256):
    		return sha256.New()
    	}
    	return nil
    }
    
    // Trailing return whether the checksum is trailing.
    func (c ChecksumType) Trailing() bool {
    	return c.Is(ChecksumTrailing)
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  6. internal/logger/targets.go

    		key := strings.ToLower(t.Type().String())
    		n := cnt[key]
    		cnt[key]++
    		key = fmt.Sprintf("audit_%s_%d", key, n)
    		res[key] = t.Stats()
    	}
    
    	return res
    }
    
    // AddSystemTarget adds a new logger target to the
    // list of enabled loggers
    func AddSystemTarget(ctx context.Context, t Target) error {
    	if err := t.Init(ctx); err != nil {
    		return err
    	}
    
    	swapSystemMuRW.Lock()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 02 22:56:14 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  7. cmd/bucket-targets.go

    func newHCClient() *madmin.AnonymousClient {
    	clnt, e := madmin.NewAnonymousClientNoEndpoint()
    	if e != nil {
    		bugLogIf(GlobalContext, errors.New("Unable to initialize health check client"))
    		return nil
    	}
    	clnt.SetCustomTransport(globalRemoteTargetTransport)
    	return clnt
    }
    
    // heartBeat performs liveness check on remote endpoints.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  8. cmd/globals.go

    	// global Trace system to send HTTP request/response
    	// and Storage/OS calls info to registered listeners.
    	globalTrace = pubsub.New[madmin.TraceInfo, madmin.TraceType](8)
    
    	// global Listen system to send S3 API events to registered listeners
    	globalHTTPListen = pubsub.New[event.Event, pubsub.Mask](0)
    
    	// global console system to send console logs to
    	// registered listeners
    	globalConsoleSys *HTTPConsoleLoggerSys
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  9. cmd/erasure-server-pool-rebalance.go

    			return index
    		}
    	}
    	return -1
    }
    
    // initRebalanceMeta initializes rebalance metadata for a new rebalance
    // operation and saves it in the object store.
    func (z *erasureServerPools) initRebalanceMeta(ctx context.Context, buckets []string) (arn string, err error) {
    	r := &rebalanceMeta{
    		ID:        shortuuid.New(),
    		PoolStats: make([]*rebalanceStats, len(z.serverPools)),
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  10. docs/debugging/xl-meta/main.go

    		cli.BoolFlag{
    			Usage: "combine inline data",
    			Name:  "combine",
    		},
    	}
    
    	app.Action = func(c *cli.Context) error {
    		ndjson := c.Bool("ndjson")
    		if c.Bool("data") && c.Bool("combine") {
    			return errors.New("cannot combine --data and --combine")
    		}
    		// file / version / file
    		filemap := make(map[string]map[string]string)
    		// versionID ->
    		combineFiles := make(map[string][]string)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
Back to top