Skip to content

Commit

Permalink
cmd/livepeer: Add support for -j flag for mist connector (#2196)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpotter92 authored Feb 1, 2022
1 parent 09321bf commit d4c981d
Show file tree
Hide file tree
Showing 4 changed files with 280 additions and 84 deletions.
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

0 comments on commit d4c981d

Please sign in to comment.