Refactor livepeer.go to enable running Livepeer node from the code #2351
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this pull request do? Explain your changes. (required)
Refactor
livepeer.go
to allow running Livepeer node from the code. After this change, you can start Livepeer node from the code (without passing any flags) in the following manner.The context for this change is the work on implementing E2E Testing which would cover interactions with the chain. Additionally, I believe it's a way better code structure when we split the configuration and the flags parsing.
Some ideas for future improvements (not included in this PR):
main()
to extract it into functions likeparseOrchAddrs()
Specific updates (required)
LivepeerConfig
type and theDefaultLivepeerConfig()
functionLivepeerConfig
LivepeerConfig
instead of using theisFlagSet
mapparseOrchAddrs()
functionHow did you test each of these updates (required)
Started Livepeer on-chain and off-chain and played with transcoding and CLI interactions.
Does this pull request close any open issues?
No, but it's related to #2317
Checklist:
make
runs successfully./test.sh
passREADME and other documentation updated