Skip to content

Commit e867e03

Browse files
authored
Merge pull request #16 from JoshVanL/spelling-client-for-metadata
Fix spelling of manager interface ClientForMetadata
2 parents 9bbe96e + 6bd9d2d commit e867e03

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

manager/interfaces.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ type SignRequestFunc func(meta metadata.Metadata, key crypto.PrivateKey, request
8484
// CertificateRequest, without any attempt to parse or decode the bytes.
8585
type WriteKeypairFunc func(meta metadata.Metadata, key crypto.PrivateKey, chain []byte, ca []byte) error
8686

87-
// ClientForMatadataFunc will return a cert-manager API client used for
87+
// ClientForMetadataFunc will return a cert-manager API client used for
8888
// creating objects. This is called with the metadata associated with the
8989
// volume being published. Useful for modifying clients to make use of CSI
9090
// token requests.
91-
type ClientForMatadataFunc func(meta metadata.Metadata) (cmclient.Interface, error)
91+
type ClientForMetadataFunc func(meta metadata.Metadata) (cmclient.Interface, error)

manager/manager.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ type Options struct {
5252
// requests.
5353
Client cmclient.Interface
5454

55-
// ClientForMatadataFunc is used for returning a client that is used for
55+
// ClientForMetadataFunc is used for returning a client that is used for
5656
// creating cert-manager API objects given a volume's metadata. If nil,
5757
// Client will always be used.
58-
ClientForMatadata ClientForMatadataFunc
58+
ClientForMetadata ClientForMetadataFunc
5959

6060
// Used the read metadata from the storage backend
6161
MetadataReader storage.MetadataReader
@@ -91,8 +91,8 @@ func NewManager(opts Options) (*Manager, error) {
9191
if opts.Client == nil {
9292
return nil, errors.New("Client must be set")
9393
}
94-
if opts.ClientForMatadata == nil {
95-
opts.ClientForMatadata = func(_ metadata.Metadata) (cmclient.Interface, error) {
94+
if opts.ClientForMetadata == nil {
95+
opts.ClientForMetadata = func(_ metadata.Metadata) (cmclient.Interface, error) {
9696
return opts.Client, nil
9797
}
9898
}
@@ -146,7 +146,7 @@ func NewManager(opts Options) (*Manager, error) {
146146

147147
m := &Manager{
148148
client: opts.Client,
149-
clientForMetadata: opts.ClientForMatadata,
149+
clientForMetadata: opts.ClientForMetadata,
150150
lister: lister,
151151
metadataReader: opts.MetadataReader,
152152
clock: opts.Clock,
@@ -202,7 +202,7 @@ type Manager struct {
202202

203203
// clientForMetadata used to create objects in the cert-manager API given a
204204
// volume's metadata
205-
clientForMetadata ClientForMatadataFunc
205+
clientForMetadata ClientForMetadataFunc
206206

207207
// lister is used as a read-only cache of CertificateRequest resources
208208
lister cmlisters.CertificateRequestLister
@@ -491,15 +491,15 @@ func (m *Manager) ManageVolume(volumeID string) error {
491491
// 2s is the 'base' amount of time for the backoff
492492
Duration: time.Second * 2,
493493
// We multiple the 'duration' by 2.0 if the attempt fails/errors
494-
Factor: 2.0,
494+
Factor: 2.0,
495495
// Add a jitter of +/- 1s (0.5 of the 'duration')
496-
Jitter: 0.5,
496+
Jitter: 0.5,
497497
// 'Steps' controls what the maximum number of backoff attempts is before we
498498
// reset back to the 'base duration'. Set this to the MaxInt32, as we never want to
499499
// reset this unless we get a successful attempt.
500-
Steps: math.MaxInt32,
500+
Steps: math.MaxInt32,
501501
// The maximum time between calls will be 1 minute
502-
Cap: time.Minute,
502+
Cap: time.Minute,
503503
}, func() (bool, error) {
504504
log.Info("Triggering new issuance")
505505
if err := m.issue(volumeID); err != nil {

0 commit comments

Comments
 (0)