Documentation ¶
Index ¶
Constants ¶
View Source
const MaxUsed = 65536
MaxUsed defines the maximum number of Nonces we're willing to hold in memory.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NonceService ¶
type NonceService struct {
// contains filtered or unexported fields
}
NonceService generates, cancels, and tracks Nonces.
func NewNonceService ¶
func NewNonceService(scope metrics.Scope) (*NonceService, error)
NewNonceService constructs a NonceService with defaults
func (*NonceService) Nonce ¶
func (ns *NonceService) Nonce() (string, error)
Nonce provides a new Nonce.
func (*NonceService) Valid ¶
func (ns *NonceService) Valid(nonce string) bool
Valid determines whether the provided Nonce string is valid, returning true if so.
Click to show internal directories.
Click to hide internal directories.