GetNamespaceOrDefault returns the namespace for Dapr, or the default namespace if it is not set.
(defaultNamespace string)
| 135 | |
| 136 | // GetNamespaceOrDefault returns the namespace for Dapr, or the default namespace if it is not set. |
| 137 | func GetNamespaceOrDefault(defaultNamespace string) string { |
| 138 | namespace := os.Getenv("NAMESPACE") |
| 139 | if namespace == "" { |
| 140 | namespace = defaultNamespace |
| 141 | } |
| 142 | return namespace |
| 143 | } |
| 144 | |
| 145 | func ParseServiceAddr(val string) []string { |
| 146 | p := strings.Split(val, ",") |
no outgoing calls