randomKeyMgr

package
v0.0.0-...-97ce03a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL