Skip to content
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

Add skeleton of a config #2

Merged
merged 7 commits into from
Jul 5, 2019
Merged

Add skeleton of a config #2

merged 7 commits into from
Jul 5, 2019

Conversation

Kubuxu
Copy link
Contributor

@Kubuxu Kubuxu commented Jul 3, 2019

Took way longer than it should have because I was researching existing
options.

As it turns out, nothing nice exists that would handle:

  • Multiple overrideable config files
  • Defaults provided in a struct
  • Output in a struct

This settles for much less, just TOML and no overrides apart from default.

@magik6k magik6k self-requested a review July 3, 2019 17:12
@Kubuxu Kubuxu requested review from magik6k and removed request for magik6k July 3, 2019 17:29
Took way longer than it should had because I was researching exisiting
options.

As it turns out, nothing nice exists that would handle:
 - Multiple overridiable config files
 - Defaults provided in a struct
 - Output in a struct

License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
@Kubuxu
Copy link
Contributor Author

Kubuxu commented Jul 4, 2019

@magik6k how would you wire in config.Root to api server?

@magik6k
Copy link
Contributor

magik6k commented Jul 4, 2019

We shouldn't mix config into the DI stuff, there was a discussion on this in go-ipfs and we decided that it should be kept separate (mixing those makes life harder, especially when reading the code).

I'll handle this

@magik6k magik6k self-assigned this Jul 4, 2019
@magik6k magik6k force-pushed the feat/config branch 3 times, most recently from e7e46b3 to 700cb18 Compare July 4, 2019 21:06
magik6k and others added 3 commits July 5, 2019 12:06
License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
@magik6k magik6k mentioned this pull request Jul 5, 2019
8 tasks
Copy link
Member

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems pretty straightforward (minus the DI magic). I'd like to use json for the config files, but don't let that block us

@magik6k magik6k merged commit 984f896 into master Jul 5, 2019
@magik6k magik6k deleted the feat/config branch July 8, 2019 12:55
Kubuxu pushed a commit that referenced this pull request Apr 6, 2020
# This is the 1st commit message:

WIP: random beacon interface

Signed-off-by: Jakub Sztandera <[email protected]>

# The commit message #2 will be skipped:

# add code i forgot to add
#
# Signed-off-by: Jakub Sztandera <[email protected]>
magik6k pushed a commit that referenced this pull request Jun 24, 2020
magik6k pushed a commit that referenced this pull request Jun 26, 2020
magik6k pushed a commit that referenced this pull request Aug 10, 2020
ticket-acquiring function takes tipset identifier
nonsense pushed a commit that referenced this pull request Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants