Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for InitOnce (0.14 sec)

  1. internal/event/target/postgresql.go

    	if p.MaxOpenConnections < 0 {
    		return errors.New("maxOpenConnections cannot be less than zero")
    	}
    
    	return nil
    }
    
    // PostgreSQLTarget - PostgreSQL target.
    type PostgreSQLTarget struct {
    	initOnce once.Init
    
    	id         event.TargetID
    	args       PostgreSQLArgs
    	updateStmt *sql.Stmt
    	deleteStmt *sql.Stmt
    	insertStmt *sql.Stmt
    	db         *sql.DB
    	store      store.Store[event.Event]
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:51:07 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  2. cmd/storage-rest-client.go

    		}
    		info = *infop
    		if info.Error != "" {
    			return info, toStorageErr(errors.New(info.Error))
    		}
    		return info, nil
    	} // In all other cases cache the value upto 1sec.
    
    	client.diskInfoCache.InitOnce(time.Second,
    		cachevalue.Opts{CacheError: true},
    		func() (info DiskInfo, err error) {
    			ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
    			defer cancel()
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  3. cmd/xl-storage-disk-id-check.go

    	healthCheck  bool
    
    	metricsCache *cachevalue.Cache[DiskMetrics]
    	diskCtx      context.Context
    	diskCancel   context.CancelFunc
    }
    
    func (p *xlStorageDiskIDCheck) getMetrics() DiskMetrics {
    	p.metricsCache.InitOnce(5*time.Second,
    		cachevalue.Opts{},
    		func() (DiskMetrics, error) {
    			diskMetric := DiskMetrics{
    				LastMinute: make(map[string]AccElem, len(p.apiLatencies)),
    				APICalls:   make(map[string]uint64, len(p.apiCalls)),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
Back to top