Skip to content

Commit

Permalink
add --dmsg-server-type flag to ut
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpalide committed Sep 9, 2024
1 parent e101467 commit b91b4d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/uptime-tracker/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var (
dmsgDisc string
sk cipher.SecKey
dmsgPort uint16
dmsgServerType string
storeDataCutoff int
storeDataPath string
)
Expand All @@ -76,6 +77,7 @@ func init() {
rootCmd.Flags().StringVar(&dmsgDisc, "dmsg-disc", "http://dmsgd.skywire.skycoin.com", "url of dmsg-discovery")
rootCmd.Flags().Var(&sk, "sk", "dmsg secret key")
rootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\r")
rootCmd.Flags().StringVar(&dmsgServerType, "dmsg-server-type", "", "type of dmsg server on dmsghttp handler")
}

var rootCmd = &cobra.Command{
Expand Down Expand Up @@ -184,8 +186,9 @@ var rootCmd = &cobra.Command{
keys = append(keys, pk)
dClient := direct.NewClient(direct.GetAllEntries(keys, servers), logger)
config := &dmsg.Config{
MinSessions: 0, // listen on all available servers
UpdateInterval: dmsg.DefaultUpdateInterval,
MinSessions: 0, // listen on all available servers
UpdateInterval: dmsg.DefaultUpdateInterval,
ConnectedServersType: dmsgServerType,
}

dmsgDC, closeDmsgDC, err := direct.StartDmsg(ctx, logger, pk, sk, dClient, config)
Expand Down

0 comments on commit b91b4d3

Please sign in to comment.