Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for SaveConfig (0.11 sec)

  1. cmd/data-usage.go

    		dataUsageJSON, err := json.Marshal(dataUsageInfo)
    		if err != nil {
    			scannerLogIf(ctx, err)
    			continue
    		}
    		if attempts > 10 {
    			saveConfig(ctx, objAPI, dataUsageObjNamePath+".bkp", dataUsageJSON) // Save a backup every 10th update.
    			attempts = 1
    		}
    		if err = saveConfig(ctx, objAPI, dataUsageObjNamePath, dataUsageJSON); err != nil {
    			scannerLogOnceIf(ctx, err, dataUsageObjNamePath)
    		}
    		attempts++
    	}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 09 00:51:34 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. cmd/config-migrate.go

    	xnet "github.com/minio/pkg/v3/net"
    	"github.com/minio/pkg/v3/quick"
    )
    
    // Save config file to corresponding backend
    func Save(configFile string, data interface{}) error {
    	return quick.SaveConfig(data, configFile, globalEtcdClient)
    }
    
    // Load config from backend
    func Load(configFile string, data interface{}) (quick.Config, error) {
    	return quick.LoadConfig(configFile, globalEtcdClient, data)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. cmd/data-scanner.go

    	if globalIsErasureSD {
    		return
    	}
    
    	b, err := json.Marshal(info)
    	if err != nil {
    		bugLogIf(ctx, err)
    		return
    	}
    	// Get last healing information
    	err = saveConfig(ctx, objAPI, backgroundHealInfoPath, b)
    	if err != nil {
    		internalLogIf(ctx, err)
    	}
    }
    
    // runDataScanner will start a data scanner.
    // The function will block until the context is canceled.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 21:10:34 UTC 2024
    - 48.4K bytes
    - Viewed (0)
  4. cmd/batch-handlers.go

    		buf, err := ri.MarshalMsg(data)
    		ri.mu.Unlock()
    		if err != nil {
    			return err
    		}
    		path, err := ri.getJobReportPath()
    		if err != nil {
    			batchLogIf(ctx, err)
    			return err
    		}
    		return saveConfig(ctx, api, path, buf)
    	}
    	ri.mu.Unlock()
    	return nil
    }
    
    // Note: to be used only with batch jobs that affect multiple versions through
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 18 15:32:09 UTC 2024
    - 62.2K bytes
    - Viewed (0)
  5. cmd/bucket-metadata.go

    	// Marshal the bucket metadata
    	data, err := b.MarshalMsg(data)
    	if err != nil {
    		return err
    	}
    
    	configFile := path.Join(bucketMetaPrefix, b.Name, bucketMetadataFile)
    	return saveConfig(ctx, api, configFile, data)
    }
    
    // migrate config for remote targets by encrypting data if currently unencrypted and kms is configured.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 28 15:32:18 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  6. cmd/iam-object-store.go

    	}
    	if GlobalKMS != nil {
    		data, err = config.EncryptBytes(GlobalKMS, data, kms.Context{
    			minioMetaBucket: path.Join(minioMetaBucket, objPath),
    		})
    		if err != nil {
    			return err
    		}
    	}
    	return saveConfig(ctx, iamOS.objAPI, objPath, data)
    }
    
    func decryptData(data []byte, objPath string) ([]byte, error) {
    	if utf8.Valid(data) {
    		return data, nil
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 10 23:40:37 UTC 2024
    - 26.6K bytes
    - Viewed (0)
  7. cmd/data-usage-cache.go

    	}
    
    	save := func(name string, timeout time.Duration) error {
    		// Abandon if more than a minute, so we don't hold up scanner.
    		ctx, cancel := context.WithTimeout(ctx, timeout)
    		defer cancel()
    
    		return saveConfig(ctx, store, pathJoin(bucketMetaPrefix, name), buf.Bytes())
    	}
    	defer save(name+".bkp", 5*time.Second) // Keep a backup as well
    
    	// drive timeout by default is 2 minutes, we do not need to wait longer.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 34.7K bytes
    - Viewed (0)
  8. cmd/erasure-server-pool-decom.go

    	buf, err := p.MarshalMsg(data)
    	if err != nil {
    		return err
    	}
    
    	// Saves on all pools to make sure decommissioning of first pool is allowed.
    	for i, eset := range pools {
    		if err = saveConfig(ctx, eset, poolMetaName, buf); err != nil {
    			if !errors.Is(err, context.Canceled) {
    				storageLogIf(ctx, fmt.Errorf("saving pool.bin for pool index %d failed with: %v", i, err))
    			}
    			return err
    		}
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 13:20:19 UTC 2024
    - 42.2K bytes
    - Viewed (0)
  9. cmd/erasure-healing_test.go

    	if err != nil {
    		t.Fatalf("Failed to complete multipart upload - got: %v", err)
    	}
    
    	cfgFile := pathJoin(bucketMetaPrefix, bucket, ".test.bin")
    	if err = saveConfig(ctx, objLayer, cfgFile, data); err != nil {
    		t.Fatal(err)
    	}
    
    	hopts := madmin.HealOpts{
    		DryRun:   false,
    		Remove:   true,
    		ScanMode: madmin.HealNormalScan,
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 49K bytes
    - Viewed (0)
  10. cmd/site-replication.go

    	}
    	buf, err := json.Marshal(sdata)
    	if err != nil {
    		return err
    	}
    
    	objAPI := newObjectLayerFn()
    	if objAPI == nil {
    		return errServerNotInitialized
    	}
    
    	if err = saveConfig(ctx, objAPI, getSRStateFilePath(), buf); err != nil {
    		return err
    	}
    
    	for _, err := range globalNotificationSys.ReloadSiteReplicationConfig(ctx) {
    		replLogIf(ctx, err)
    	}
    
    	c.Lock()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 12:04:40 UTC 2024
    - 185.1K bytes
    - Viewed (0)
Back to top