Documentation
¶
Index ¶
- type ECDSAGenerator
- type Ed25519Generator
- type KeyPair
- type KeyPairGenerator
- type RSAGenerator
- type RetryI
- type RetryOp
- func (r RetryOp) Backoff() time.Duration
- func (r RetryOp) Counter() int
- func (r RetryOp) Interval() time.Duration
- func (r RetryOp) IsRetryable(err error, opDesc string) bool
- func (r RetryOp) Retries() int
- func (r RetryOp) SetBackoff(backoff time.Duration)
- func (r RetryOp) SetInterval(interval time.Duration)
- func (r RetryOp) SetRetries(retries int)
- func (r RetryOp) SetTimeout(timeout time.Duration)
- func (r RetryOp) Timeout() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ECDSAGenerator ¶
type ECDSAGenerator struct {
// contains filtered or unexported fields
}
ECDSAGenerator generates ECDSA key pairs.
func (*ECDSAGenerator) Generate ¶
func (g *ECDSAGenerator) Generate() (*KeyPair, error)
Generate generates a new key pair.
type Ed25519Generator ¶
type Ed25519Generator struct{}
Ed25519Generator generates Ed25519 key pairs.
func (*Ed25519Generator) Generate ¶
func (g *Ed25519Generator) Generate() (*KeyPair, error)
Generate generates a new key pair.
type KeyPairGenerator ¶
KeyPairGenerator generates a new key pair.
func NewECDSAGenerator ¶
func NewECDSAGenerator(c elliptic.Curve) KeyPairGenerator
NewECDSAGenerator returns a new ECDSA key pair generator.
func NewEd25519Generator ¶
func NewEd25519Generator() KeyPairGenerator
NewEd25519Generator returns a new Ed25519 key pair generator.
func NewRSAGenerator ¶
func NewRSAGenerator(bits int) KeyPairGenerator
NewRSAGenerator returns a new RSA key pair generator.
type RSAGenerator ¶
type RSAGenerator struct {
// contains filtered or unexported fields
}
RSAGenerator generates RSA key pairs.
func (*RSAGenerator) Generate ¶
func (g *RSAGenerator) Generate() (*KeyPair, error)
Generate generates a new key pair.
type RetryI ¶ added in v0.3.0
type RetryI interface { IsRetryable(err error, opDesc string) bool SetTimeout(timeout time.Duration) SetInterval(interval time.Duration) SetBackoff(backoff time.Duration) SetRetries(retries int) Timeout() time.Duration Interval() time.Duration Backoff() time.Duration Retries() int Counter() int }
RetryI is an interface for retry operations
type RetryOp ¶ added in v0.3.0
type RetryOp struct { RetryI // contains filtered or unexported fields }
RetryOp is a retry operation
func (RetryOp) Counter ¶ added in v0.9.0
Counter returns the number of times the operation has been retried
func (RetryOp) IsRetryable ¶ added in v0.4.0
IsRetryable returns true if the operation is retryable
func (RetryOp) Retries ¶ added in v0.3.0
Retries returns the number of retries for the retry operation
func (RetryOp) SetBackoff ¶ added in v0.3.0
SetBackoff sets the backoff for the retry operation
func (RetryOp) SetInterval ¶ added in v0.3.0
SetInterval sets the interval for the retry operation
func (RetryOp) SetRetries ¶ added in v0.3.0
SetRetries sets the number of retries for the retry operation
func (RetryOp) SetTimeout ¶ added in v0.3.0
SetTimeout sets the timeout for the retry operation