Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNonce ¶
func GetNonce() string
GetNonce is a naive nonce producer that takes the current Unix nano epoch and counts upwards. This is a naive approach because the nonce bound to the currently used API key and as such needs to be synchronised with other instances using the same key in order to avoid race conditions.
Types ¶
type EpochNonceGenerator ¶
type EpochNonceGenerator struct {
// contains filtered or unexported fields
}
func NewEpochNonceGenerator ¶
func NewEpochNonceGenerator() *EpochNonceGenerator
func (*EpochNonceGenerator) GetNonce ¶
func (u *EpochNonceGenerator) GetNonce() string
GetNonce is a naive nonce producer that takes the current Unix nano epoch and counts upwards. This is a naive approach because the nonce bound to the currently used API key and as such needs to be synchronised with other instances using the same key in order to avoid race conditions.
type NonceGenerator ¶
type NonceGenerator interface {
GetNonce() string
}
Click to show internal directories.
Click to hide internal directories.