Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RandomKeyMgr ¶
type RandomKeyMgr struct {
// contains filtered or unexported fields
}
func GetSingleInstance ¶
func GetSingleInstance() *RandomKeyMgr
func (*RandomKeyMgr) CheckRandomKey ¶
func (r *RandomKeyMgr) CheckRandomKey(inputKey string) bool
CheckRandomKey check the given randomKey is equal to the current key or previous key
func (*RandomKeyMgr) GenNewRandomKey ¶
func (r *RandomKeyMgr) GenNewRandomKey() string
GenNewRandomKey generate a new random key as currentKey, and the old one will be record as previousKey
func (*RandomKeyMgr) GetRandomKey ¶
func (r *RandomKeyMgr) GetRandomKey() (currentKey string, previousKey string)
func (*RandomKeyMgr) ScheduleUpdateRandomKey ¶
func (r *RandomKeyMgr) ScheduleUpdateRandomKey()
ScheduleUpdateRandomKey start a background job. This job will generate new random key periodically
Click to show internal directories.
Click to hide internal directories.