mirror of https://github.com/dapr/cli.git
Added a warning message for unix domain socket (#822)
* Added a warning message for unix domain socket * Added socket warning message to invoke and publish * Corrected socket name in publish cmd * Corrected the variable names for invoke and publish * Removed unused variables port and grpcPort from invoke and publish * Cleaned up the error of warning messages * Cleaned up the wording of warning messages * Cleaned up the wording of warning messages * Cleaned up the wording of warning messages on run, invoke and publish * Modified the warning message Co-authored-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local> Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
This commit is contained in:
parent
9587b327a7
commit
0648583823
|
@ -62,9 +62,13 @@ dapr invoke --unix-domain-socket --app-id target --method sample --verb GET
|
|||
client := standalone.NewClient()
|
||||
|
||||
// TODO(@daixiang0): add Windows support
|
||||
if runtime.GOOS == "windows" && invokeSocket != "" {
|
||||
print.FailureStatusEvent(os.Stderr, "unix-domain-socket option still does not support Windows!")
|
||||
os.Exit(1)
|
||||
if invokeSocket != "" {
|
||||
if runtime.GOOS == "windows" {
|
||||
print.FailureStatusEvent(os.Stderr, "The unix-domain-socket option is not supported on Windows")
|
||||
os.Exit(1)
|
||||
} else {
|
||||
print.WarningStatusEvent(os.Stdout, "Unix domain sockets are currently a preview feature")
|
||||
}
|
||||
}
|
||||
|
||||
response, err := client.Invoke(invokeAppID, invokeAppMethod, bytePayload, invokeVerb, invokeSocket)
|
||||
|
|
|
@ -56,9 +56,13 @@ dapr publish --enable-domain-socket --publish-app-id myapp --pubsub target --top
|
|||
|
||||
client := standalone.NewClient()
|
||||
// TODO(@daixiang0): add Windows support
|
||||
if runtime.GOOS == "windows" && publishSocket != "" {
|
||||
print.FailureStatusEvent(os.Stderr, "unix-domain-socket option still does not support Windows!")
|
||||
os.Exit(1)
|
||||
if publishSocket != "" {
|
||||
if runtime.GOOS == "windows" {
|
||||
print.FailureStatusEvent(os.Stderr, "The unix-domain-socket option is not supported on Windows")
|
||||
os.Exit(1)
|
||||
} else {
|
||||
print.WarningStatusEvent(os.Stdout, "Unix domain sockets are currently a preview feature")
|
||||
}
|
||||
}
|
||||
err = client.Publish(publishAppID, pubsubName, publishTopic, bytePayload, publishSocket)
|
||||
if err != nil {
|
||||
|
|
|
@ -72,10 +72,11 @@ var RunCmd = &cobra.Command{
|
|||
if unixDomainSocket != "" {
|
||||
// TODO(@daixiang0): add Windows support
|
||||
if runtime.GOOS == "windows" {
|
||||
print.FailureStatusEvent(os.Stderr, "unix-domain-socket option still does not support Windows!")
|
||||
print.FailureStatusEvent(os.Stderr, "The unix-domain-socket option is not supported on Windows")
|
||||
os.Exit(1)
|
||||
} else {
|
||||
// use unix domain socket means no port any more
|
||||
print.WarningStatusEvent(os.Stdout, "Unix domain sockets are currently a preview feature")
|
||||
port = 0
|
||||
grpcPort = 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue