-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix(core): improve config management package #233
Conversation
@@ -0,0 +1,100 @@ | |||
package newconfig |
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.
new?
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.
Just did it temporarily so that you can notice the changes easily.
Will replace it with the old config package once everything here is done
type Config struct { | ||
} | ||
|
||
type IConfig interface { |
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.
Too generic name
return nil | ||
} | ||
|
||
func getJsonSubkey(data []byte, keyName string) []byte { |
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.
Where is this used?
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.
return []byte(val), nil | ||
} | ||
|
||
func deleteJsonSubkey(data []byte, keyName string) ([]byte, 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.
Unused
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.
return nil | ||
} | ||
|
||
func (h *hostCfgHandler) Remove() 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.
What is the purpose of remove?
@namit-chandwani I do not see how this would work. Approach with subkeys is not going to allow us to load and write structure. Please look at example plugin and example host. Modify them to use different configs and we can discuss later hoe to swap the config from host. Proposed PR doesn't differ much with config on main branch that we covered over last call. |
Ignore comments. Lets work with @ankithans to help him with examples and solve config outside core first |
WIP (Up for an early discussion)
Closes #184
Description
Type of change
Checklist