Skip to content

Commit

Permalink
Add cli argument for tuna service name and tuna sub topics
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang committed Jul 28, 2020
1 parent 296c89f commit 2efe62d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ func main() {
to := flag.String("to", "", "to address (nkn address or ip:port)")
useTuna := flag.Bool("tuna", false, "use tuna instead of nkn client for nkn session")
tunaCountry := flag.String("country", "", `tuna service node allowed country code, separated by comma, e.g. "US" or "US,CN"`)
tunaServiceName := flag.String("tsn", "", "tuna reverse service name")
tunaSubscriptionPrefix := flag.String("tsp", "", "tuna subscription prefix")
tunaMaxPrice := flag.String("tuna-max-price", "0.01", "tuna max price in unit of NKN/MB")
mtu := flag.Int("mtu", 0, "ncp session mtu")
verbose := flag.Bool("v", false, "show logs on dialing/accepting connection")
Expand Down Expand Up @@ -59,8 +61,10 @@ func main() {
}

tsConfig = &ts.Config{
TunaIPFilter: &tuna.IPFilter{Allow: locations},
TunaMaxPrice: *tunaMaxPrice,
TunaIPFilter: &tuna.IPFilter{Allow: locations},
TunaServiceName: *tunaServiceName,
TunaSubscriptionPrefix: *tunaSubscriptionPrefix,
TunaMaxPrice: *tunaMaxPrice,
}
}

Expand Down

0 comments on commit 2efe62d

Please sign in to comment.