// configure DNS query expiration
772053
func setQueryTimeouts(c net.Conn) {
	now := time.Now()
	c.SetReadDeadline(now.Add(readDeadline))
	c.SetWriteDeadline(now.Add(writeDeadline))
}
1098623
func (s *S3InitiateRestoreObjectOperation) SetExpirationInDays(v int64) *S3InitiateRestoreObjectOperation {
	s.ExpirationInDays = &v
	return s
}
138552
func (g *Generator) SetWindowsNetworkAllowUnqualifiedDNSQuery(setting bool) {
	g.initConfigWindowsNetwork()
	g.Config.Windows.Network.AllowUnqualifiedDNSQuery = setting
}
1180419
func UpdateExpirationFasthttp(ctx *fasthttp.RequestCtx, expires time.Duration) {
	Default.UpdateExpirationFasthttp(ctx, expires)
}
165978
func (state *ServicesState) ExpireServer(hostname string) {
	if !state.HasServer(hostname) || len(state.Servers[hostname].Services) == 0 {
		log.Infof("No records to expire for %s", hostname)
		return
	}

	hasLiveServices := false
	for _, svc := range state.Servers[hostname].Services {
		if !svc.IsTombstone() {
			hasLiveServices = true
			break
		}
	}

	if !hasLiveServices {
		log.Infof("No records to expire for %s (no live services)", hostname)
		return
	}

	log.Infof("Expiring %s", hostname)

	var tombstones []service.Service

	for _, svc := range state.Servers[hostname].Services {
		previousStatus := svc.Status
		state.ServiceChanged(svc, previousStatus, svc.Updated)
		svc.Tombstone()
		tombstones = append(tombstones, *svc)
	}

	if len(tombstones) < 1 {
		log.Warn("Tried to announce a zero length list of tombstones")
		return
	}

	state.SendServices(
		tombstones,
		director.NewTimedLooper(TOMBSTONE_COUNT, state.tombstoneRetransmit, nil),
	)
}
938568
func (c *CDN) SetForceRedirectConfig(domainName string, redirectType RedirectType, resp interface{}) (err error) {
	if global.EmptyString == domainName || global.EmptyString == redirectType {
		return errors.New("domainName or redirectType should not be empty")
	}
	req := c.cdnReq.Clone().(*Request)
	req.Action = SetForceRedirectConfigAction
	req.SetArgs("DomainName", domainName)
	req.SetArgs("RedirectType", string(redirectType))
	err = c.rpc.Query(req, resp)
	return
}
212023
func (c *CertAuthorityV2) SetExpiry(expires time.Time) {
	c.Metadata.SetExpiry(expires)
}
209838
func (r *Router) Configure(opts ...RouterOption) {
	for _, o := range opts {
		o(r)
	}
}
317146
func (c *RedisCache) SetExpire(key string, data interface{}, ttl int64) error {
	conn, err := c.conn()
	if err != nil {
		return err
	}
	defer conn.Close()

	if data == nil {
		_, err = conn.Do("DEL", c.prefix+key)
		return err
	}

	item := eurekache.NewItem()
	item.SetExpire(ttl)
	item.Value = data

	var buf bytes.Buffer
	enc := gob.NewEncoder(&buf)
	err = enc.Encode(item)
	if err != nil {
		return err
	}

	switch {
	case ttl < 1:
		_, err = conn.Do("SET", c.prefix+key, buf.Bytes())
	default:
		ttl = ttl / 1000 // convert milli-sec to sec
		_, err = conn.Do("SETEX", c.prefix+key, ttl, buf.Bytes())
	}

	if err != nil {
		return err
	}
	return nil
}
443590
func (r *RoleV3) SetExpiry(expires time.Time) {
	r.Metadata.SetExpiry(expires)
}
320550
func defaultQueryOptions() *queryOptions {
	return &queryOptions{
		timeout:            QueryTimeout,
		numRetries:         uint8(QueryNumRetries),
		peerConnectTimeout: QueryPeerConnectTimeout,
		encoding:           QueryEncoding,
		optimisticBatch:    noBatch,
	}
}
785648
func (a *SetCookieArgs) SetExpires(expires TimeSinceEpoch) *SetCookieArgs {
	a.Expires = expires
	return a
}
703203
func (s *CrlConfiguration) SetExpirationInDays(v int64) *CrlConfiguration {
	s.ExpirationInDays = &v
	return s
}
497824
func (c *ClusterNameV2) SetExpiry(expires time.Time) {
	c.Metadata.SetExpiry(expires)
}
661843
func (k *Key) SetQueryParameters(opts ...interface{}) {
	k.QueryParameters = transport.URLEncode(newQueryParams(opts...))
}
520838
func (s *Activation) SetExpired(v bool) *Activation {
	s.Expired = &v
	return s
}
1019253
func (s *Sessions) ShiftExpiration(w http.ResponseWriter, r *http.Request) {
	s.UpdateExpiration(w, r, s.config.Expires)
}