-
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
Standard Service configuration #7
Conversation
@@ -0,0 +1,123 @@ | |||
package grpcclient | |||
|
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.
I think the metadata constants and some of the functions are not naturaly part of the client module
I have a middleware package in my branch of go-rkvstcommon for things like this
https://github.com/rkvst/go-rkvstcommon/tree/dev/robin/8337-common-metadata/middleware
I think grpcclient is fine in general for things that are definitely only the concern of client users and implementors
var ( | ||
ErrNotFound = errors.New("Environment variable not found") | ||
) | ||
|
||
// GetLogLevel returns the loglevet or panics. This is called before any logger | ||
// is available. i.e. don't use a logger here. |
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.
We have previously established the OrFatal convention because some people object to functions which terminate. I understand we cant use logger.Fatalf here because this must be called before it is created. I think OrPanic would be better aligned with established patterns.
Personally, I have no problem with declaring that the environment module is 'allowed to panic or fatal out' because it is designed to be used as part of pre-flight startup. And then remove all the OrWhatever suffixes.
But we should get everyone on board with that before doing so.
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.
Yes this is a speculative change only and may go away...
Make the tenancies client of the accesspolicies service use new standard configuration. Added service configuration logic to startup package using idiomatic Go With...() pattern.. Part of AB#8170
4512e28
to
fdbfccf
Compare
obsolete |
Make the tenancies client of the accesspolicies service use new
standard configuration.
Added service configuration logic to startup package using idiomatic
Go With...() pattern..
Part of AB#8170
Mention [stepsize] in a comment if you'd like to report some technical debt. See examples here.