Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for TTL (0.18 sec)

  1. internal/cachevalue/cache.go

    // update function, making it ready for use.
    func NewFromFunc[T any](ttl time.Duration, opts Opts, update func() (T, error)) *Cache[T] {
    	return &Cache[T]{
    		ttl:      ttl,
    		updateFn: update,
    		opts:     opts,
    	}
    }
    
    // InitOnce initializes the cache with a TTL and an update function. It is
    // guaranteed to be called only once.
    func (t *Cache[T]) InitOnce(ttl time.Duration, opts Opts, update func() (T, error)) {
    	t.Once.Do(func() {
    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/etcd.go

    	}
    }
    
    func saveKeyEtcdWithTTL(ctx context.Context, client *etcd.Client, key string, data []byte, ttl int64) error {
    	timeoutCtx, cancel := context.WithTimeout(ctx, defaultContextTimeout)
    	defer cancel()
    	lease, err := client.Grant(timeoutCtx, ttl)
    	if err != nil {
    		return etcdErrToErr(err, client.Endpoints())
    	}
    	_, err = client.Put(timeoutCtx, key, string(data), etcd.WithLease(lease.ID))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  3. cmd/iam-store.go

    		}
    
    		err := store.saveMappedPolicy(ctx, cred.ParentUser, stsUser, false, mp, options{ttl: ttl})
    		if err != nil {
    			return time.Time{}, err
    		}
    
    		cache.iamSTSPolicyMap.Store(cred.ParentUser, mp)
    	}
    
    	u := newUserIdentity(cred)
    	err := store.saveUserIdentity(ctx, accessKey, stsUser, u, options{ttl: ttl})
    	if err != nil {
    		return time.Time{}, err
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
  4. cmd/metrics-v2.go

    		metric.VariableLabels[k] = v
    	}
    	for k, v := range m.Histogram {
    		metric.Histogram[k] = v
    	}
    	return metric
    }
    
    // Get - returns cached value always upton the configured TTL,
    // once the TTL expires "read()" registered function is called
    // to return the new values and updated.
    func (g *MetricsGroupV2) Get() (metrics []MetricV2) {
    	m, _ := g.metricsCache.Get()
    	if len(m) == 0 {
    		return []MetricV2{}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 22:01:31 GMT 2024
    - 132.6K bytes
    - Viewed (0)
  5. cmd/common-main.go

    }
    
    func runDNSCache(ctx *cli.Context) {
    	dnsTTL := ctx.Duration("dns-cache-ttl")
    	// Check if we have configured a custom DNS cache TTL.
    	if dnsTTL <= 0 {
    		if orchestrated {
    			dnsTTL = 30 * time.Second
    		} else {
    			dnsTTL = 10 * time.Minute
    		}
    	}
    
    	// Call to refresh will refresh names in cache.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 35.8K bytes
    - Viewed (2)
  6. internal/config/dns/etcd_dns.go

    const etcdPathSeparator = "/"
    
    // create a new coredns service record for the bucket.
    func newCoreDNSMsg(ip string, port string, ttl uint32, t time.Time) ([]byte, error) {
    	return json.Marshal(&SrvRecord{
    		Host:         ip,
    		Port:         json.Number(port),
    		TTL:          ttl,
    		CreationDate: t,
    	})
    }
    
    // Close closes the internal etcd client and cannot be used further
    func (c *CoreDNS) Close() error {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 8.3K bytes
    - Viewed (0)
  7. internal/config/dns/types.go

    	Weight   int         `json:"weight,omitempty"`
    	Text     string      `json:"text,omitempty"`
    	Mail     bool        `json:"mail,omitempty"` // Be an MX record. Priority becomes Preference.
    	TTL      uint32      `json:"ttl,omitempty"`
    
    	// Holds info about when the entry was created first.
    	CreationDate time.Time `json:"creationDate"`
    
    	// When a SRV record with a "Host: IP-address" is added, we synthesize
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2K bytes
    - Viewed (0)
  8. cmd/server-main.go

    		Hidden: true,
    		EnvVar: "MINIO_INTERFACE",
    	},
    	cli.DurationFlag{
    		Name:   "dns-cache-ttl",
    		Usage:  "custom DNS cache TTL",
    		Hidden: true,
    		Value: func() time.Duration {
    			if orchestrated {
    				return 30 * time.Second
    			}
    			return 10 * time.Minute
    		}(),
    		EnvVar: "MINIO_DNS_CACHE_TTL",
    	},
    	cli.IntFlag{
    		Name:   "max-idle-conns-per-host",
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 15:54:03 GMT 2024
    - 34.9K bytes
    - Viewed (1)
Back to top