// Register adds a store to this expiry service.
// store is the store on which to periodically cleanup expired data.
// name is used to identify the purpose of this expiry service for logging purposes.
// expiryTagName is the tag name used to store expiry values under. The expiry values must be standard Unix timestamps.
Register adds a store to this expiry service.
store is the store on which to periodically cleanup expired data.
name is used to identify the purpose of this expiry service for logging purposes.
expiryTagName is the tag name used to store expiry values under. The expiry values must be standard Unix timestamps.
// Register adds a store to this expiry service . // store is the store on which to periodically cleanup expired data . // name is used to identify the purpose of this expiry service for logging purposes . // expiryTagName is the tag name used to store expiry values under . The expiry values must be standard Unix timestamps .
func (s *Service) Register(store storage.Store, expiryTagName, storeName string, opts ...Option) {
	newRegisteredStore := registeredStore{
		store:         store,
		name:          storeName,
		expiryTagName: expiryTagName,
		expiryHandler: &noopExpiryHandler{},
	}
	for _, opt := range opts {
		opt(&newRegisteredStore)
	}
	s.mutex.Lock()
	s.registeredStores = append(s.registeredStores, newRegisteredStore)
	s.mutex.Unlock()
}
func ( s * Service ) Register ( store storage . Store , expiryTagName , storeName string , opts ... Option ) { newRegisteredStore := registeredStore { store : store , name : storeName , expiryTagName : expiryTagName , expiryHandler : & noopExpiryHandler { } , } for _ , opt := range opts { opt ( & newRegisteredStore ) } s . mutex . Lock ( ) s . registeredStores = append ( s . registeredStores , newRegisteredStore ) s . mutex . Unlock ( ) }
Register adds a store to this expiry service.
Register adds a store to this expiry service .
// apply options