Add Authority to gRPC Transport (#3076)

Why couldn't you have Host, for the last three years?
This commit is contained in:
RPRX 2024-02-29 14:22:14 +00:00 committed by GitHub
parent aa101d9dc2
commit 7184a8165f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 57 additions and 43 deletions

View file

@ -6,7 +6,8 @@ import (
)
type GRPCConfig struct {
ServiceName string `json:"serviceName" `
Authority string `json:"authority"`
ServiceName string `json:"serviceName"`
MultiMode bool `json:"multiMode"`
IdleTimeout int32 `json:"idle_timeout"`
HealthCheckTimeout int32 `json:"health_check_timeout"`
@ -28,6 +29,7 @@ func (g *GRPCConfig) Build() (proto.Message, error) {
}
return &grpc.Config{
Authority: g.Authority,
ServiceName: g.ServiceName,
MultiMode: g.MultiMode,
IdleTimeout: g.IdleTimeout,