-
Notifications
You must be signed in to change notification settings - Fork 71
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
Config Download #540
Config Download #540
Conversation
Co-authored-by: Olli Holmala <85518764+olli-holmala@users.noreply.github.com>
|
||
func NewHttpConfigClient() *HttpConfigClient { | ||
httpClient := http.Client{ | ||
Timeout: time.Second * 10, |
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.
can you move this to a config setting?
files := instances.Files{} | ||
|
||
req, err := http.NewRequest(http.MethodGet, filesUrl, nil) | ||
req.Header.Set("tenantId", tenantID.String()) |
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.
tenantId is probably better as a constant
@@ -0,0 +1,83 @@ | |||
package datasource |
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.
copywrite header missing
) | ||
|
||
// map of files with filepath as key | ||
type FileCache = map[string]*instances.File |
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.
should this type be visible outside of this file?
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 as its needed in config writer
|
||
ConfigWriterParameters struct { | ||
configDownloader client.HttpConfigClientInterface | ||
client Client |
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.
client Client | |
Client Client |
Proposed changes
Added:
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentmake install-tools
and have attached any dependency changes to this pull requestREADME.md
)