Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyFetcher ¶
KeyFetcher fetches keys in batch
type KeyFetcherFake ¶
type KeyFetcherFake struct {
// contains filtered or unexported fields
}
KeyFetcherFake represents an in memory key generator
func NewKeyFetcherFake ¶
func NewKeyFetcherFake(availableKeys []Key) KeyFetcherFake
NewKeyFetcherFake creates fake key generator
type KeyGenerator ¶
type KeyGenerator struct {
// contains filtered or unexported fields
}
KeyGenerator fetches unique keys in batch from key generation service and buffer them in memory for fast response.
func NewKeyGenerator ¶
func NewKeyGenerator(bufferSize int, keyFetcher KeyFetcher) (KeyGenerator, error)
NewKeyGenerator creates KeyGenerator
func (KeyGenerator) NewKey ¶
func (r KeyGenerator) NewKey() (Key, error)
NewKey produces a unique key
Click to show internal directories.
Click to hide internal directories.