mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-24 03:46:37 +02:00
637a6a3628
* add warden rpc
17 lines
394 B
Go
17 lines
394 B
Go
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),
|
|
)
|
|
}
|