Skip to content

Make gRPC service structs forward-compatible by embedding Unimplemented.. types #987

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

Merged
merged 2 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/v1/imagescan/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ func NewService(db database.Datastore, nvdCache nvdtoolscache.Cache) Service {
}

type serviceImpl struct {
v1.UnimplementedImageScanServiceServer

version string
db database.Datastore
nvdCache nvdtoolscache.Cache
Expand Down
2 changes: 2 additions & 0 deletions api/v1/nodescan/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ func NewService(db database.Datastore, nvdCache nvdtoolscache.Cache, k8sCache k8
}

type serviceImpl struct {
v1.UnimplementedNodeScanServiceServer

version string
db database.Datastore
nvdCache nvdtoolscache.Cache
Expand Down
2 changes: 2 additions & 0 deletions api/v1/orchestratorscan/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ func NewService(db database.Datastore, k8sCache k8scache.Cache) Service {
}

type serviceImpl struct {
v1.UnimplementedOrchestratorScanServiceServer

version string
db database.Datastore
k8sCache k8scache.Cache
Expand Down
2 changes: 2 additions & 0 deletions api/v1/ping/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ func NewService() Service {
}

type serviceImpl struct {
v1.UnimplementedPingServiceServer

version string
}

Expand Down
2 changes: 2 additions & 0 deletions api/v1/vulndefs/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func NewService(db database.Datastore) Service {
}

type serviceImpl struct {
v1.UnimplementedVulnDefsServiceServer

db database.Datastore
}

Expand Down