Fix gRPC servers (#6510)

Bump github.com/linkerd/linkerd2-proxy-api from 0.1.18 to 0.2.0

Bumps [github.com/linkerd/linkerd2-proxy-api](https://github.com/linkerd/linkerd2-proxy-api) from 0.1.18 to 0.2.0.
- [Release notes](https://github.com/linkerd/linkerd2-proxy-api/releases)
- [Changelog](https://github.com/linkerd/linkerd2-proxy-api/blob/main/CHANGES.md)
- [Commits](https://github.com/linkerd/linkerd2-proxy-api/compare/v0.1.18...v0.2.0)

---
updated-dependencies:
- dependency-name: github.com/linkerd/linkerd2-proxy-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Oliver Gould <olix0r@gmail.com>

Co-authored-by: Oliver Gould <ver@buoyant.io>
Co-authored-by: Oliver Gould <olix0r@gmail.com>
This commit is contained in:
dependabot[bot] 2021-07-19 10:24:23 -05:00 committed by GitHub
parent 19c9de8c70
commit 789aeea561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 9 deletions

View File

@ -26,6 +26,8 @@ import (
type (
server struct {
pb.UnimplementedDestinationServer
endpoints *watcher.EndpointsWatcher
opaquePorts *watcher.OpaquePortsWatcher
profiles *watcher.ProfileWatcher
@ -84,6 +86,7 @@ func NewServer(
trafficSplits := watcher.NewTrafficSplitWatcher(k8sAPI, log)
srv := server{
pb.UnimplementedDestinationServer{},
endpoints,
opaquePorts,
profiles,

View File

@ -348,6 +348,7 @@ status:
k8sAPI.Sync(nil)
return &server{
pb.UnimplementedDestinationServer{},
endpoints,
opaquePorts,
profiles,

2
go.mod
View File

@ -20,7 +20,7 @@ require (
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/imdario/mergo v0.3.12
github.com/julienschmidt/httprouter v1.3.0
github.com/linkerd/linkerd2-proxy-api v0.1.18
github.com/linkerd/linkerd2-proxy-api v0.2.0
github.com/linkerd/linkerd2-proxy-init v1.3.13
github.com/mattn/go-isatty v0.0.13
github.com/mattn/go-runewidth v0.0.13

4
go.sum
View File

@ -564,8 +564,8 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhn
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
github.com/linkerd/linkerd2-proxy-api v0.1.18 h1:sDPIjEdzP3JoVH8xhQ/Csi4Se/1E8ucaOADGSwRyRAo=
github.com/linkerd/linkerd2-proxy-api v0.1.18/go.mod h1:yFz+DCCEomC3vpsChFzfCuOuSJtzx7jMNNHBIlbFil0=
github.com/linkerd/linkerd2-proxy-api v0.2.0 h1:bbtx/tSPrajcUvhd8KtwylVKIaUWTvfGP/ucJddIbL4=
github.com/linkerd/linkerd2-proxy-api v0.2.0/go.mod h1:EIFzeyjPwmXTq+EgfX4prgVf7GuUKATCIVKeoHA/tKg=
github.com/linkerd/linkerd2-proxy-init v1.3.13 h1:Y7xKWOAV8F8tvGy28/d3KeFKOfIEyvTMC0Fv/DA+uDE=
github.com/linkerd/linkerd2-proxy-init v1.3.13/go.mod h1:re7j9P7dBpV+/k23NoFGk8JHC0AbKH6Ww1zRaudaW+w=
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=

View File

@ -41,12 +41,14 @@ const (
type (
// Service implements the gRPC service in terms of a Validator and Issuer.
Service struct {
validator Validator
trustAnchors *x509.CertPool
issuer *tls.Issuer
issuerMutex *sync.RWMutex
validity *tls.Validity
recordEvent func(parent runtime.Object, eventType, reason, message string)
pb.UnimplementedIdentityServer
validator Validator
trustAnchors *x509.CertPool
issuer *tls.Issuer
issuerMutex *sync.RWMutex
validity *tls.Validity
recordEvent func(parent runtime.Object, eventType, reason, message string)
expectedName, issuerPathCrt, issuerPathKey string
}
@ -136,6 +138,7 @@ func (svc *Service) loadCredentials() (tls.Issuer, error) {
// NewService creates a new identity service.
func NewService(validator Validator, trustAnchors *x509.CertPool, validity *tls.Validity, recordEvent func(parent runtime.Object, eventType, reason, message string), expectedName, issuerPathCrt, issuerPathKey string) *Service {
return &Service{
pb.UnimplementedIdentityServer{},
validator,
trustAnchors,
nil,

View File

@ -39,6 +39,7 @@ func (m *mockTapByResourceServer) Send(event *tapPb.TapEvent) error {
// mockProxyTapServer satisfies proxy.tap.TapServer
type mockProxyTapServer struct {
proxy.UnimplementedTapServer
mockControllerServer mockTapByResourceServer // for cancellation
ctx context.Context
}