grpc: remove ptypes references (#3078)

This commit is contained in:
Caleb Doxsey 2022-02-24 08:37:59 -07:00 committed by GitHub
parent 35f697e491
commit 1342523cda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 83 additions and 177 deletions

View file

@ -10,7 +10,6 @@ import (
"github.com/pomerium/pomerium/internal/signal"
pb "github.com/pomerium/pomerium/pkg/grpc/registry"
"github.com/golang/protobuf/ptypes"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/durationpb"
@ -116,10 +115,7 @@ func (s *inMemoryServer) lockAndReport(services []*pb.Service) (bool, error) {
// reportLocked updates registration and also returns an indication whether service list was updated
func (s *inMemoryServer) reportLocked(services []*pb.Service) (bool, error) {
expires, err := ptypes.TimestampProto(time.Now().Add(s.ttl))
if err != nil {
return false, err
}
expires := timestamppb.New(time.Now().Add(s.ttl))
inserted := false
for _, svc := range services {