Skip to content

Commit 3bdee54

Browse files
authored
Merge pull request #6839 from RainbowMango/pr_generates_estimator_grpc_client_interface
Add estimator gRPC client interface: MaxAvailableComponentSets
2 parents d15f6a0 + 15ca7e0 commit 3bdee54

File tree

4 files changed

+134
-6
lines changed

4 files changed

+134
-6
lines changed

pkg/estimator/server/server.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ func (es *AccurateSchedulerEstimatorServer) MaxAvailableReplicas(ctx context.Con
223223
return &pb.MaxAvailableReplicasResponse{MaxReplicas: maxReplicas}, nil
224224
}
225225

226+
// MaxAvailableComponentSets is the implementation of gRPC interface.
227+
// It returns the maximum number of complete multi-component sets (in terms of replicas) that each cluster can host.
228+
func (es *AccurateSchedulerEstimatorServer) MaxAvailableComponentSets(context.Context, *pb.MaxAvailableComponentSetsRequest) (*pb.MaxAvailableComponentSetsResponse, error) {
229+
return &pb.MaxAvailableComponentSetsResponse{}, fmt.Errorf("not implemented yet")
230+
}
231+
226232
// GetUnschedulableReplicas is the implementation of gRPC interface. It will return the
227233
// unschedulable replicas of a workload.
228234
func (es *AccurateSchedulerEstimatorServer) GetUnschedulableReplicas(ctx context.Context, request *pb.UnschedulableReplicasRequest) (response *pb.UnschedulableReplicasResponse, rerr error) {

pkg/estimator/service/mock_EstimatorClient.go

Lines changed: 83 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/estimator/service/service.pb.go

Lines changed: 44 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/estimator/service/service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ option go_package = "service";
2525

2626
service Estimator {
2727
rpc MaxAvailableReplicas(pb.MaxAvailableReplicasRequest) returns (pb.MaxAvailableReplicasResponse) {}
28+
rpc MaxAvailableComponentSets(pb.MaxAvailableComponentSetsRequest) returns (pb.MaxAvailableComponentSetsResponse) {}
2829
rpc GetUnschedulableReplicas(pb.UnschedulableReplicasRequest) returns (pb.UnschedulableReplicasResponse) {}
2930
}

0 commit comments

Comments
 (0)