Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for TTL (0.12 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. 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)
  4. 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)
Back to top