-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft options config #47
Conversation
@@ -527,6 +531,18 @@ func TestNoUntil(t *testing.T) { | |||
}) | |||
} | |||
|
|||
// func TestUntilOption(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will add test back in later
@@ -300,6 +303,30 @@ func (v1 *RegistrationV1) ValidateDuration(ttl time.Duration) error { | |||
return errs | |||
} | |||
|
|||
func (v1 *RegistrationV1) CheckUntil(now func() time.Time, jitter, maxTTL time.Duration) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of this code comes from https://github.com/xmidt-org/ancla/blob/e805e4b4ede085fb97b4fcab8ca7a1ebc2216520/webhookValidator.go#L113
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! lgtm 🍻
-Added CheckUntil option from original ancla: https://github.com/xmidt-org/ancla/blob/e805e4b4ede085fb97b4fcab8ca7a1ebc2216520/webhookValidator.go#L113