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

cmd/livepeer: Add support for -j flag for mist connector #2196

Merged
merged 4 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
### Features ⚒

#### General
- \#2196 Add support for Mist runtime environment (@hjpotter92)

- \#2212 y/n confirmation when sending a transaction via the CLI (@noisersup)

- \#2216 Fix Accept Multiline message on Windows (@leszko)
Expand Down
14 changes: 14 additions & 0 deletions cmd/livepeer/livepeer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/livepeer/go-livepeer/pm"
"github.com/livepeer/go-livepeer/server"
"github.com/livepeer/livepeer-data/pkg/event"
"github.com/livepeer/livepeer-data/pkg/mistconnector"
"github.com/peterbourgon/ff/v3"

ethcommon "github.com/ethereum/go-ethereum/common"
Expand Down Expand Up @@ -83,6 +84,8 @@ func main() {
//We preserve this flag before resetting all the flags. Not a scalable approach, but it'll do for now. More discussions here - https://github.com/livepeer/go-livepeer/pull/617
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)

mistJson := flag.Bool("j", false, "Print application info as json")

// Network & Addresses:
network := flag.String("network", "offchain", "Network to connect to")
rtmpAddr := flag.String("rtmpAddr", "127.0.0.1:"+RtmpPort, "Address to bind for RTMP commands")
Expand Down Expand Up @@ -178,6 +181,17 @@ func main() {

blockPollingTime := time.Duration(*blockPollingInterval) * time.Second

if *mistJson {
mistconnector.PrintMistConfigJson(
"livepeer",
"Official implementation of the Livepeer video processing protocol. Can play all roles in the network.",
"Livepeer",
core.LivepeerVersion,
flag.CommandLine,
)
return
}

if *version {
fmt.Println("Livepeer Node Version: " + core.LivepeerVersion)
fmt.Printf("Golang runtime version: %s %s\n", runtime.Compiler, runtime.Version())
Expand Down
15 changes: 8 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/livepeer/go-livepeer
go 1.13

require (
cloud.google.com/go/storage v1.6.0
cloud.google.com/go/storage v1.10.0
contrib.go.opencensus.io/exporter/prometheus v0.1.0
github.com/allegro/bigcache v1.2.1 // indirect
github.com/aws/aws-sdk-go v1.33.11
Expand All @@ -14,31 +14,32 @@ require (
github.com/ethereum/go-ethereum v1.10.14
github.com/fatih/color v1.12.0 // indirect
github.com/golang/glog v0.0.0-20210429001901-424d2337a529
github.com/golang/mock v1.4.3
github.com/golang/mock v1.5.0
github.com/golang/protobuf v1.5.2
github.com/jaypipes/ghw v0.7.0
github.com/livepeer/livepeer-data v0.2.0
github.com/livepeer/livepeer-data v0.4.8
github.com/livepeer/lpms v0.0.0-20220111151401-0eb91f2facdb
github.com/livepeer/m3u8 v0.11.1
github.com/mattn/go-sqlite3 v1.11.0
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/olekukonko/tablewriter v0.0.5
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/peterbourgon/ff/v3 v3.1.2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.1.0
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/tsdb v0.10.0 // indirect
github.com/rjeczalik/notify v0.9.2 // indirect
github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.7.0
github.com/tyler-smith/go-bip39 v1.0.2 // indirect
github.com/urfave/cli v1.20.0
go.opencensus.io v0.22.3
go.opencensus.io v0.23.0
go.uber.org/goleak v1.0.0
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
google.golang.org/api v0.29.0
google.golang.org/grpc v1.28.0
google.golang.org/api v0.44.0
google.golang.org/grpc v1.38.0
pgregory.net/rapid v0.4.0
)
Loading