-
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
Spire injection client #26
Conversation
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
type controllerKey struct{} | ||
|
||
// GetControllerAPIClient extracts the ControllerAPIClient from the context. | ||
func GetControllerAPIClient(ctx context.Context) ControllerAPIClient { |
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.
Doing some testing here. Seems like I am running into the untyped == nil
. Do I need to setup the context in some way for this to work?
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.
hmm interesting, yea maybe it requires setting up the context with the injection library.
) | ||
|
||
func init() { | ||
injection.Fake.RegisterClient(withFakeControllerClient) | ||
injection.Fake.RegisterClient(withFakeEntrypointerClient) |
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.
This works with the mocked spire tests. But why don't you need the GetEntrypointerAPIClient
here?
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
No description provided.