Skip to content

Commit

Permalink
NSP API Update function removed
Browse files Browse the repository at this point in the history
This function was doing the same things as the Register one, and was
no longer used.
LionelJouin committed Feb 16, 2022
1 parent 7414b7e commit d698b49
Showing 3 changed files with 15 additions and 62 deletions.
71 changes: 15 additions & 56 deletions api/nsp/v1/targetregistry.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion api/nsp/v1/targetregistry.proto
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@ import "api/nsp/v1/model.proto";
service TargetRegistry {
rpc Register(Target) returns (google.protobuf.Empty) {}
rpc Unregister(Target) returns (google.protobuf.Empty) {}
rpc Update(Target) returns (google.protobuf.Empty) {}
rpc Watch(Target) returns (stream TargetResponse) {}
}

5 changes: 0 additions & 5 deletions pkg/nsp/server.go
Original file line number Diff line number Diff line change
@@ -48,11 +48,6 @@ func (s *Server) Unregister(ctx context.Context, target *nspAPI.Target) (*empty.
return &empty.Empty{}, s.TargetRegistry.Remove(ctx, target)
}

func (s *Server) Update(ctx context.Context, target *nspAPI.Target) (*empty.Empty, error) {
logrus.Infof("Update: %v", target)
return &empty.Empty{}, s.TargetRegistry.Set(ctx, target)
}

func (s *Server) Watch(t *nspAPI.Target, watcher nspAPI.TargetRegistry_WatchServer) error {
targetWatcher, err := s.TargetRegistry.Watch(context.TODO(), t)
if err != nil {

0 comments on commit d698b49

Please sign in to comment.