You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
394 B
17 lines
394 B
6 years ago
|
package resolver
|
||
|
|
||
|
import (
|
||
|
"flag"
|
||
|
"fmt"
|
||
|
)
|
||
|
|
||
|
// RegisterTarget will register grpc discovery mock address flag
|
||
|
func RegisterTarget(target *string, discoveryID string) {
|
||
|
flag.CommandLine.StringVar(
|
||
|
target,
|
||
|
fmt.Sprintf("grpc.%s", discoveryID),
|
||
|
fmt.Sprintf("discovery://default/%s", discoveryID),
|
||
|
fmt.Sprintf("App's grpc target.\n example: -grpc.%s=\"127.0.0.1:9090\"", discoveryID),
|
||
|
)
|
||
|
}
|