-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support dapr-proxy mode #65
Conversation
968a967
to
46bce09
Compare
Signed-off-by: wrongerror <[email protected]>
handler, err := daprd.NewService(fmt.Sprintf(":%s", port)) | ||
|
||
var newService func(address string) (s dapr.Service, err error) | ||
protocol := daprruntime.Protocol(os.Getenv(protocolEnvVar)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we are providing both HTTP and gRPC here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just because developing dapr-proxy requires both grpc and http support (ff-nodejs using http).
@@ -19,6 +21,7 @@ import ( | |||
|
|||
const ( | |||
defaultPattern = "/" | |||
protocolEnvVar = "APP_PROTOCOL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I understand correctly, we will need to pass this environment variable via openfunction controller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, openfunction controller will set this envVar,when serving.annotations
contains dapr.io/app-protocol: http
. (only do so in one dapr-sidecar-per-function mode).
daprHost
from env vars, init daprClient based ondaprHost
anddaprGRPCPort
.Signed-off-by: wrongerror [email protected]