Skip to content

Commit

Permalink
Update plugin proto for ExecutorService and add piped pluginservice (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhtc1202 authored and 鈴木 優耀 committed Apr 18, 2024
1 parent 7121bd4 commit 6df4ff9
Show file tree
Hide file tree
Showing 9 changed files with 1,849 additions and 181 deletions.
544 changes: 544 additions & 0 deletions pkg/app/pipedv1/cmd/piped/service/service.pb.go

Large diffs are not rendered by default.

788 changes: 788 additions & 0 deletions pkg/app/pipedv1/cmd/piped/service/service.pb.validate.go

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions pkg/app/pipedv1/cmd/piped/service/service.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Copyright 2024 The PipeCD Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package grpc.piped.service;
option go_package = "github.com/pipe-cd/pipecd/pkg/app/pipedv1/cmd/piped/service";

import "validate/validate.proto";
import "pkg/model/command.proto";
import "pkg/model/analysis_result.proto";

// PluginService provides the ability to interact with plugins.
service PluginService {
// ListStageCommands returns the list requested commands to the given stage.
rpc ListStageCommands(ListStageCommandsRequest) returns (ListStageCommandsResponse) {}

// Put and Get the latest analysis result of a given application.
// Used by the analysis plugin to store and retrieve the latest analysis result.
rpc GetLatestAnalysisResult(GetLatestAnalysisResultRequest) returns (GetLatestAnalysisResultResponse) {}
rpc PutLatestAnalysisResult(PutLatestAnalysisResultRequest) returns (PutLatestAnalysisResultResponse) {}
}

message ListStageCommandsRequest {
string deployment_id = 1 [(validate.rules).string = {min_len: 1}];
string stage_id = 2 [(validate.rules).string = {min_len: 1}];
}

message ListStageCommandsResponse {
repeated model.Command commands = 1;
}

message GetLatestAnalysisResultRequest {
string application_id = 1 [(validate.rules).string = {min_len: 1}];
}

message GetLatestAnalysisResultResponse {
model.AnalysisResult analysis_result = 1;
}

message PutLatestAnalysisResultRequest {
string application_id = 1 [(validate.rules).string = {min_len: 1}];
model.AnalysisResult analysis_result = 2;
}

message PutLatestAnalysisResultResponse {
}
183 changes: 183 additions & 0 deletions pkg/app/pipedv1/cmd/piped/service/service_grpc.pb.go

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

Loading

0 comments on commit 6df4ff9

Please sign in to comment.