File: kasapp.proto

package info (click to toggle)
gitlab-agent 16.1.3-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 6,324 kB
  • sloc: makefile: 175; sh: 52; ruby: 3
file content (85 lines) | stat: -rw-r--r-- 2,532 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
syntax = "proto3";

// If you make any changes make sure you run: make regenerate-proto

package gitlab.agent.kas;

option go_package = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/cmd/kas/kasapp";

import "internal/tool/grpctool/automata/automata.proto";
import "internal/tool/prototool/prototool.proto";
//import "github.com/envoyproxy/protoc-gen-validate/blob/master/validate/validate.proto";
import "validate/validate.proto";
// https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto
import "google/rpc/status.proto";

message StartStreaming {
}

message GatewayKasResponse {
  // Tunnel is ready, can start forwarding stream.
  message TunnelReady {
  }

  // No tunnels available at the moment.
  message NoTunnel {
  }

  // Headers is a gRPC metadata.
  message Header {
    map<string, prototool.Values> meta = 1;
  }

  // Message is a gRPC message data.
  message Message {
    bytes data = 1;
  }

  // Trailer is a gRPC trailer metadata.
  message Trailer {
    map<string, prototool.Values> meta = 1;
  }

  // Error represents a gRPC error that should be returned.
  message Error {
    // Error status as returned by gRPC.
    // See https://cloud.google.com/apis/design/errors.
    google.rpc.Status status = 1 [(validate.rules).message.required = true];
  }

  oneof msg {
    option (validate.required) = true;
    option (grpctool.automata.first_allowed_field) = -1;
    option (grpctool.automata.first_allowed_field) = 1;
    option (grpctool.automata.first_allowed_field) = 6;

    TunnelReady tunnel_ready = 1 [
      (grpctool.automata.next_allowed_field) = 2,
      (validate.rules).message.required = true
    ];
    Header header = 2 [
      (grpctool.automata.next_allowed_field) = 3,
      (grpctool.automata.next_allowed_field) = 4,
      (validate.rules).message.required = true
    ];
    Message message = 3 [
      (grpctool.automata.next_allowed_field) = 3,
      (grpctool.automata.next_allowed_field) = 4,
      (validate.rules).message.required = true
    ];
    Trailer trailer = 4 [
      (grpctool.automata.next_allowed_field) = 5,
      (grpctool.automata.next_allowed_field) = -1,
      (validate.rules).message.required = true
    ];
    Error error = 5 [
      (grpctool.automata.next_allowed_field) = -1,
      (validate.rules).message.required = true
    ];
    NoTunnel no_tunnel = 6 [
      (grpctool.automata.next_allowed_field) = -1,
      (grpctool.automata.next_allowed_field) = 1,
      (validate.rules).message.required = true
    ];
  }
}