// Expires creates a new ExpirationFactory based on the
// provided ExpirationPolicy.
Expires creates a new ExpirationFactory based on the
provided ExpirationPolicy.
// Expires creates a new ExpirationFactory based on the // provided ExpirationPolicy .
func Expires(duration time.Duration, policy ExpirationPolicy) ExpirationFactory {
	return func(shardIndex int) ExpirationService {
		switch policy {
		case ExpirationPolicySweep:
			return NewSweepExpirationService(duration)
		}
		return NewPassiveExpirationService(duration)
	}
}
func Expires ( duration time . Duration , policy ExpirationPolicy ) ExpirationFactory { return func ( shardIndex int ) ExpirationService { switch policy { case ExpirationPolicySweep : return NewSweepExpirationService ( duration ) } return NewPassiveExpirationService ( duration ) } }
Expires creates a new ExpirationFactory based on the
provided ExpirationPolicy.
Expires creates a new ExpirationFactory based on the provided ExpirationPolicy .