Skip to content

Commit

Permalink
Add publiser endpoint to auditor configuration and cli
Browse files Browse the repository at this point in the history
  • Loading branch information
gdiazlo committed Dec 3, 2018
1 parent e2859d1 commit ecb95a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/agent_auditor.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

func newAgentAuditorCommand(ctx *agentContext) *cobra.Command {

var qedEndpoints []string
var qedUrls, pubUrls []string

cmd := &cobra.Command{
Use: "auditor",
Expand All @@ -40,7 +40,8 @@ func newAgentAuditorCommand(ctx *agentContext) *cobra.Command {
agentConfig.Role = member.Auditor
auditorConfig := auditor.DefaultConfig()
auditorConfig.APIKey = apiKey
auditorConfig.QEDEndpoints = qedEndpoints
auditorConfig.QEDUrls = qedUrls
auditorConfig.PubUrls = pubUrls

auditor, err := auditor.NewAuditor(auditorConfig)
if err != nil {
Expand All @@ -63,7 +64,8 @@ func newAgentAuditorCommand(ctx *agentContext) *cobra.Command {
},
}

cmd.Flags().StringSliceVarP(&qedEndpoints, "endpoints", "", []string{}, "Comma-delimited list of QED servers ([host]:port), through which an auditor can make queries")
cmd.Flags().StringSliceVarP(&qedUrls, "qedUrls", "", []string{}, "Comma-delimited list of QED servers ([host]:port), through which an auditor can make queries")
cmd.Flags().StringSliceVarP(&pubUrls, "pubUrls", "", []string{}, "Comma-delimited list of QED servers ([host]:port), through which an auditor can make queries")
cmd.MarkFlagRequired("endpoints")

return cmd
Expand Down

0 comments on commit ecb95a4

Please sign in to comment.