github.com/kubeshop/testkube@v1.17.23/proto/service.proto (about) 1 syntax = "proto3"; 2 3 package cloud; 4 5 option go_package = "pkg/cloud"; 6 7 import "google/protobuf/empty.proto"; 8 import "google/protobuf/struct.proto"; 9 10 service TestKubeCloudAPI { 11 // Deprecated, use ExecuteAsync instead, 12 // Will remove this after we fully migrate to ExecuteAsync. 13 rpc Execute(stream ExecuteResponse) returns (stream ExecuteRequest); 14 rpc Send(stream WebsocketData) returns (google.protobuf.Empty); 15 rpc Call(CommandRequest) returns (CommandResponse); 16 rpc ExecuteAsync(stream ExecuteResponse) returns (stream ExecuteRequest); 17 rpc GetLogsStream(stream LogsStreamResponse) returns (stream LogsStreamRequest); 18 rpc GetTestWorkflowNotificationsStream(stream TestWorkflowNotificationsResponse) returns (stream TestWorkflowNotificationsRequest); 19 } 20 21 enum LogsStreamRequestType { 22 STREAM_LOG_MESSAGE = 0; 23 STREAM_HEALTH_CHECK = 1; 24 } 25 26 enum TestWorkflowNotificationsRequestType { 27 WORKFLOW_STREAM_LOG_MESSAGE = 0; 28 WORKFLOW_STREAM_HEALTH_CHECK = 1; 29 } 30 31 enum TestWorkflowNotificationType { 32 WORKFLOW_STREAM_ERROR = 0; 33 WORKFLOW_STREAM_LOG = 1; 34 WORKFLOW_STREAM_RESULT = 2; 35 WORKFLOW_STREAM_OUTPUT = 3; 36 } 37 38 message LogsStreamRequest { 39 string stream_id = 1; 40 string execution_id = 2; 41 LogsStreamRequestType request_type = 3; 42 } 43 44 message LogsStreamResponse { 45 string stream_id = 1; 46 int64 seq_no = 2; 47 string log_message = 3; 48 bool is_error = 4; 49 } 50 51 message CommandRequest { 52 string command = 1; 53 google.protobuf.Struct payload = 2; 54 } 55 56 message CommandResponse { 57 bytes response = 1; 58 } 59 60 message ExecuteRequest { 61 string method = 1; 62 string url = 2; 63 map<string, HeaderValue> headers = 3; 64 bytes body = 4; 65 string message_id = 5; 66 } 67 68 message TestWorkflowNotificationsRequest { 69 string stream_id = 1; 70 string execution_id = 2; 71 TestWorkflowNotificationsRequestType request_type = 3; 72 } 73 74 message TestWorkflowNotificationsResponse { 75 string stream_id = 1; 76 uint32 seq_no = 2; 77 string timestamp = 3; 78 string ref = 4; 79 TestWorkflowNotificationType type = 5; 80 string message = 6; // based on type: log/error = inline, others = serialized to JSON 81 } 82 83 message HeaderValue { 84 repeated string header = 1; 85 } 86 87 message ExecuteResponse { 88 int64 status = 1; 89 map<string, HeaderValue> headers = 2; 90 bytes body = 3; 91 string message_id = 4; 92 } 93 94 enum Opcode { 95 UNSPECFIED = 0; 96 TEXT_FRAME = 1; 97 BINARY_FRAME = 2; 98 HEALTH_CHECK = 3; 99 } 100 101 message WebsocketData { 102 Opcode opcode = 1; 103 bytes body = 2; 104 }