Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for readConfig (0.11 sec)

  1. cmd/config.go

    				RestoreID:  strings.TrimSuffix(path.Base(obj.Name), kvPrefix),
    				CreateTime: obj.ModTime, // ModTime is createTime for config history entries.
    			}
    			if withData {
    				data, err := readConfig(ctx, objAPI, obj.Name)
    				if err != nil {
    					// ignore history file if not readable.
    					continue
    				}
    
    				data, err = decryptData(data, obj.Name)
    				if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 23 10:07:06 UTC 2023
    - 6K bytes
    - Viewed (0)
  2. cmd/data-usage.go

    		},
    	)
    
    	return prefixUsageCache.GetWithCtx(ctx)
    }
    
    func loadDataUsageFromBackend(ctx context.Context, objAPI ObjectLayer) (DataUsageInfo, error) {
    	buf, err := readConfig(ctx, objAPI, dataUsageObjNamePath)
    	if err != nil {
    		buf, err = readConfig(ctx, objAPI, dataUsageObjNamePath+".bkp")
    		if err != nil {
    			if errors.Is(err, errConfigNotFound) {
    				return DataUsageInfo{}, nil
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 09 00:51:34 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. cmd/admin-handlers-config-kv.go

    	result.Cfg, err = readServerConfig(ctx, objectAPI, nil)
    	if err != nil {
    		return
    	}
    
    	result.Dynamic, err = result.Cfg.ReadConfig(bytes.NewReader(kvBytes))
    	if err != nil {
    		return
    	}
    
    	result.SubSys, _, _, err = config.GetSubSys(string(kvBytes))
    	if err != nil {
    		return
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  4. cmd/config-common.go

    	buf, err := io.ReadAll(r)
    	if err != nil {
    		return nil, ObjectInfo{}, err
    	}
    	if len(buf) == 0 {
    		return nil, ObjectInfo{}, errConfigNotFound
    	}
    	return buf, r.ObjInfo, nil
    }
    
    func readConfig(ctx context.Context, store objectIO, configFile string) ([]byte, error) {
    	buf, _, err := readConfigWithMetadata(ctx, store, configFile, ObjectOptions{})
    	return buf, err
    }
    
    type objectDeleter interface {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 18 17:00:54 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  5. cmd/config-migrate.go

    	}
    	if osIsPermission(err) {
    		logger.Info("Older config found but is not readable %s, proceeding to read config from other places", err)
    	}
    	if osIsNotExist(err) || osIsPermission(err) || len(data) == 0 {
    		data, err = readConfig(GlobalContext, objAPI, configFile)
    		if err != nil {
    			// when config.json is not found, then we freshly initialize.
    			if errors.Is(err, errConfigNotFound) {
    				return newServerCfg()
    			}
    			return nil, err
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  6. cmd/admin-handlers-idp-config.go

    	}
    
    	cfg, err := readServerConfig(ctx, objectAPI, nil)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	dynamic, err := cfg.ReadConfig(strings.NewReader(cfgData))
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	// IDP config is not dynamic. Sanity check.
    	if dynamic {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  7. cmd/tier.go

    func loadTierConfig(ctx context.Context, objAPI ObjectLayer) (*TierConfigMgr, error) {
    	if objAPI == nil {
    		return nil, errServerNotInitialized
    	}
    
    	data, err := readConfig(ctx, objAPI, tierConfigPath)
    	if err != nil {
    		return nil, err
    	}
    
    	if len(data) <= 4 {
    		return nil, errors.New("tierConfigInit: no data")
    	}
    
    	// Read header
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 20:44:05 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  8. cmd/bucket-metadata.go

    		return BucketMetadata{}, errInvalidArgument
    	}
    	b := newBucketMetadata(name)
    	configFile := path.Join(bucketMetaPrefix, name, bucketMetadataFile)
    	data, err := readConfig(ctx, api, configFile)
    	if err != nil {
    		return b, err
    	}
    	if len(data) <= 4 {
    		return b, fmt.Errorf("loadBucketMetadata: no data")
    	}
    	// Read header
    	switch binary.LittleEndian.Uint16(data[0:2]) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 28 15:32:18 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  9. cmd/data-scanner.go

    }
    
    func readBackgroundHealInfo(ctx context.Context, objAPI ObjectLayer) backgroundHealInfo {
    	if globalIsErasureSD {
    		return backgroundHealInfo{}
    	}
    
    	// Get last healing information
    	buf, err := readConfig(ctx, objAPI, backgroundHealInfoPath)
    	if err != nil {
    		if !errors.Is(err, errConfigNotFound) {
    			internalLogOnceIf(ctx, err, backgroundHealInfoPath)
    		}
    		return backgroundHealInfo{}
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 21:10:34 UTC 2024
    - 48.4K bytes
    - Viewed (0)
  10. cmd/batch-handlers.go

    	case batchExpireName:
    		version = batchExpireVersionV1
    		format = batchExpireFormat
    	default:
    		return errors.New("no supported batch job request specified")
    	}
    
    	data, err := readConfig(ctx, api, path)
    	if err != nil {
    		if errors.Is(err, errConfigNotFound) || isErrObjectNotFound(err) {
    			return errNoSuchJob
    		}
    		return err
    	}
    	if len(data) == 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 18 15:32:09 UTC 2024
    - 62.2K bytes
    - Viewed (0)
Back to top