From 3ce6c705bc4e751bfbec343508449a7e8dcabbc7 Mon Sep 17 00:00:00 2001 From: Andreas Auernhammer Date: Mon, 29 Apr 2024 23:15:38 +0200 Subject: [PATCH] kms: add support for capturing performace profiles This commit adds support for capturing perf. profiles at a KMS server. Now, a client can start a performace profile via: ``` client.StartProfiling(ctx, &ProfileRequest{ Host: "192.168.188.110:7373", ... }) ``` After some time, the client can either inspect that status of an ongoing profiling via: ``` client.ProfileStatus(ctx, &ProfileRequest{ Host: "192.168.188.110:7373", ... }) ``` or stop the profiling and download the results: ``` client.StopProfiling(ctx, &ProfileRequest{ Host: "192.168.188.110:7373", ... }) ``` The result of a profile is a stream of pprof files packed into a TAR archive. Signed-off-by: Andreas Auernhammer --- .github/workflows/go.yml | 9 +- .golangci.yml | 2 +- kms/client.go | 148 +++++++++ kms/internal/api/api.go | 2 + kms/protobuf/request.pb.go | 4 +- kms/protobuf/response.pb.go | 588 ++++++++++++++++++++++-------------- kms/protobuf/response.proto | 35 +++ kms/protobuf/rule.pb.go | 4 +- kms/request.go | 30 ++ kms/response.go | 79 +++++ 10 files changed, 660 insertions(+), 241 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ae389ea..b1319a4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.21.8 + go-version: 1.22.2 check-latest: true - name: Check out code uses: actions/checkout@v3 @@ -40,7 +40,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.21.8 + go-version: 1.22.2 check-latest: true - name: Check out code uses: actions/checkout@v3 @@ -57,12 +57,13 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.21.8 + go-version: 1.22.2 check-latest: true - name: Get govulncheck run: go install golang.org/x/vuln/cmd/govulncheck@latest shell: bash - name: Run govulncheck run: | - govulncheck ./kms ./kes + govulncheck -C ./kms + govulncheck -C ./kes shell: bash diff --git a/.golangci.yml b/.golangci.yml index caa34d7..b7a6f28 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -31,4 +31,4 @@ issues: - "package-comments: should have a package comment" service: - golangci-lint-version: 1.52.0 # use the fixed version to not introduce new linters unexpectedly + golangci-lint-version: 1.57.2 # use the fixed version to not introduce new linters unexpectedly diff --git a/kms/client.go b/kms/client.go index cec553f..ca590eb 100644 --- a/kms/client.go +++ b/kms/client.go @@ -14,11 +14,13 @@ import ( "crypto/x509/pkix" "encoding/pem" "errors" + "fmt" "math/big" "net" "net/http" "net/url" "slices" + "strconv" "strings" "sync" "time" @@ -412,6 +414,150 @@ func (c *Client) Ready(ctx context.Context, req *ReadinessRequest) error { return errors.Join(errs...) } +// StartProfiling enables profiling on req.Host. A client must call +// StopProfiling to stop the profiling again and obtain the resutls. +// The ProfileRequest specifies which types of profiles should be +// enabled and disabled. +// +// The returned error is of type *HostError. +func (c *Client) StartProfiling(ctx context.Context, req *ProfileRequest) error { + const ( + Method = http.MethodPost + Path = api.PathProfile + StatusOK = http.StatusOK + ) + + url, err := url.JoinPath(httpsURL(req.Host), Path) + if err != nil { + return hostError(req.Host, err) + } + url += fmt.Sprintf("?cpu=%v", req.CPU) + url += fmt.Sprintf("&heap=%v", req.Heap) + + switch { + case req.Goroutine && req.Thread: + url += fmt.Sprintf("&thread=%v", "all") + case req.Goroutine: + url += fmt.Sprintf("&thread=%v", "runtime") + case req.Thread: + url += fmt.Sprintf("&thread=%v", "os") + } + + if req.BlockRate > 0 { + url += "&block=" + strconv.Itoa(req.BlockRate) + } + if req.MutexFraction > 0 { + url += "&mutex=" + strconv.Itoa(req.MutexFraction) + } + + r, err := http.NewRequestWithContext(ctx, Method, url, nil) + if err != nil { + return hostError(req.Host, err) + } + r.Header.Set(headers.Accept, headers.ContentTypeBinary) + + resp, err := c.direct.Do(r) + if err != nil { + return hostError(req.Host, err) + } + defer resp.Body.Close() + + if resp.StatusCode != StatusOK { + return hostError(req.Host, readError(resp)) + } + return nil +} + +// ProfilingStatus returns status information about an ongoing profiling +// at req.Host. +// +// The returned error is of type *HostError. +func (c *Client) ProfilingStatus(ctx context.Context, req *ProfileRequest) (*ProfileStatusResponse, error) { + const ( + Method = http.MethodGet + Path = api.PathProfile + StatusOK = http.StatusOK + ) + url, err := url.JoinPath(httpsURL(req.Host), Path) + if err != nil { + return nil, hostError(req.Host, err) + } + + r, err := http.NewRequestWithContext(ctx, Method, url, nil) + if err != nil { + return nil, hostError(req.Host, err) + } + r.Header.Set(headers.Accept, headers.ContentTypeBinary) + + resp, err := c.direct.Do(r) + if err != nil { + return nil, hostError(req.Host, err) + } + defer resp.Body.Close() + + if resp.StatusCode != StatusOK { + return nil, hostError(req.Host, readError(resp)) + } + + var response ProfileStatusResponse + if err = readResponse(resp, &response); err != nil { + return nil, err + } + return &response, nil +} + +// StopProfiling stops an ongoing profiling operation and returns +// its results. It's the callers responsibility to close the returned +// ProfileResponse. +// +// The returned error is of type *HostError. +func (c *Client) StopProfiling(ctx context.Context, req *ProfileRequest) (*ProfileResponse, error) { + const ( + Method = http.MethodDelete + Path = api.PathProfile + StatusOK = http.StatusOK + ) + + url, err := url.JoinPath(httpsURL(req.Host), Path) + if err != nil { + return nil, hostError(req.Host, err) + } + + r, err := http.NewRequestWithContext(ctx, Method, url, nil) + if err != nil { + return nil, hostError(req.Host, err) + } + r.Header.Add(headers.Accept, headers.ContentTypeAppAny) + r.Header.Add(headers.Accept, headers.ContentEncodingGZIP) + + resp, err := c.direct.Do(r) + if err != nil { + return nil, hostError(req.Host, err) + } + if resp.StatusCode != StatusOK { + defer resp.Body.Close() + return nil, hostError(req.Host, readError(resp)) + } + + // Decompress the response body if the HTTP client doesn't + // decompress automatically. + body := resp.Body + if resp.Header.Get(headers.ContentEncoding) == headers.ContentEncodingGZIP { + z, err := gzip.NewReader(body) + if err != nil { + resp.Body.Close() + return nil, hostError(req.Host, err) + } + body = gzipReadCloser{ + gzip: z, + closer: body, + } + } + return &ProfileResponse{ + Body: body, + }, nil +} + // ClusterStatus returns status information about the entire KMS cluster. // The returned ClusterStatusResponse contains status information for all // nodes within the cluster. It requires SysAdmin privileges. @@ -558,6 +704,7 @@ func (c *Client) ReadDB(ctx context.Context) (*ReadDBResponse, error) { return nil, hostError(host, err) } if resp.StatusCode != StatusOK { + defer resp.Body.Close() return nil, hostError(host, readError(resp)) } @@ -567,6 +714,7 @@ func (c *Client) ReadDB(ctx context.Context) (*ReadDBResponse, error) { if resp.Header.Get(headers.ContentEncoding) == headers.ContentEncodingGZIP { z, err := gzip.NewReader(body) if err != nil { + resp.Body.Close() return nil, hostError(host, err) } body = gzipReadCloser{ diff --git a/kms/internal/api/api.go b/kms/internal/api/api.go index dab54cf..c54deb3 100644 --- a/kms/internal/api/api.go +++ b/kms/internal/api/api.go @@ -17,6 +17,8 @@ const ( PathHealthStatus = "/v1/health/status" PathHealthAPIs = "/v1/health/api" + PathProfile = "/v1/debug/pprof" + PathDB = "/v1/db" PathKMS = "/v1/kms/" diff --git a/kms/protobuf/request.pb.go b/kms/protobuf/request.pb.go index 71b870f..8595e80 100644 --- a/kms/protobuf/request.pb.go +++ b/kms/protobuf/request.pb.go @@ -9,8 +9,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.25.2 +// protoc-gen-go v1.33.0 +// protoc v5.26.1 // source: request.proto package protobuf diff --git a/kms/protobuf/response.pb.go b/kms/protobuf/response.pb.go index 969e98b..984a2d0 100644 --- a/kms/protobuf/response.pb.go +++ b/kms/protobuf/response.pb.go @@ -9,8 +9,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.25.2 +// protoc-gen-go v1.33.0 +// protoc v5.26.1 // source: response.proto package protobuf @@ -384,6 +384,101 @@ func (x *ServerStatusResponse) GetStackMemInUse() uint64 { return 0 } +type ProfileStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Started *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=Started,json=started,proto3" json:"Started,omitempty"` + CPU bool `protobuf:"varint,2,opt,name=CPU,json=cpu,proto3" json:"CPU,omitempty"` + Heap bool `protobuf:"varint,3,opt,name=Heap,json=heap,proto3" json:"Heap,omitempty"` + Goroutine bool `protobuf:"varint,4,opt,name=Goroutine,json=goroutine,proto3" json:"Goroutine,omitempty"` + Thread bool `protobuf:"varint,5,opt,name=Thread,json=thread,proto3" json:"Thread,omitempty"` + BlockRate uint32 `protobuf:"varint,6,opt,name=BlockRate,json=block_rate,proto3" json:"BlockRate,omitempty"` + MutexFraction uint32 `protobuf:"varint,7,opt,name=MutexFraction,json=mutex_frac,proto3" json:"MutexFraction,omitempty"` +} + +func (x *ProfileStatusResponse) Reset() { + *x = ProfileStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_response_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProfileStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProfileStatusResponse) ProtoMessage() {} + +func (x *ProfileStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_response_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProfileStatusResponse.ProtoReflect.Descriptor instead. +func (*ProfileStatusResponse) Descriptor() ([]byte, []int) { + return file_response_proto_rawDescGZIP(), []int{3} +} + +func (x *ProfileStatusResponse) GetStarted() *timestamppb.Timestamp { + if x != nil { + return x.Started + } + return nil +} + +func (x *ProfileStatusResponse) GetCPU() bool { + if x != nil { + return x.CPU + } + return false +} + +func (x *ProfileStatusResponse) GetHeap() bool { + if x != nil { + return x.Heap + } + return false +} + +func (x *ProfileStatusResponse) GetGoroutine() bool { + if x != nil { + return x.Goroutine + } + return false +} + +func (x *ProfileStatusResponse) GetThread() bool { + if x != nil { + return x.Thread + } + return false +} + +func (x *ProfileStatusResponse) GetBlockRate() uint32 { + if x != nil { + return x.BlockRate + } + return 0 +} + +func (x *ProfileStatusResponse) GetMutexFraction() uint32 { + if x != nil { + return x.MutexFraction + } + return 0 +} + type ClusterStatusResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -396,7 +491,7 @@ type ClusterStatusResponse struct { func (x *ClusterStatusResponse) Reset() { *x = ClusterStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[3] + mi := &file_response_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -409,7 +504,7 @@ func (x *ClusterStatusResponse) String() string { func (*ClusterStatusResponse) ProtoMessage() {} func (x *ClusterStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[3] + mi := &file_response_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -422,7 +517,7 @@ func (x *ClusterStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ClusterStatusResponse.ProtoReflect.Descriptor instead. func (*ClusterStatusResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{3} + return file_response_proto_rawDescGZIP(), []int{4} } func (x *ClusterStatusResponse) GetNodesUp() map[uint32]*ServerStatusResponse { @@ -455,7 +550,7 @@ type EnclaveStatusResponse struct { func (x *EnclaveStatusResponse) Reset() { *x = EnclaveStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[4] + mi := &file_response_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -468,7 +563,7 @@ func (x *EnclaveStatusResponse) String() string { func (*EnclaveStatusResponse) ProtoMessage() {} func (x *EnclaveStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[4] + mi := &file_response_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -481,7 +576,7 @@ func (x *EnclaveStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EnclaveStatusResponse.ProtoReflect.Descriptor instead. func (*EnclaveStatusResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{4} + return file_response_proto_rawDescGZIP(), []int{5} } func (x *EnclaveStatusResponse) GetName() string { @@ -517,7 +612,7 @@ type ListEnclavesResponse struct { func (x *ListEnclavesResponse) Reset() { *x = ListEnclavesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[5] + mi := &file_response_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -530,7 +625,7 @@ func (x *ListEnclavesResponse) String() string { func (*ListEnclavesResponse) ProtoMessage() {} func (x *ListEnclavesResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[5] + mi := &file_response_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -543,7 +638,7 @@ func (x *ListEnclavesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListEnclavesResponse.ProtoReflect.Descriptor instead. func (*ListEnclavesResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{5} + return file_response_proto_rawDescGZIP(), []int{6} } func (x *ListEnclavesResponse) GetEnclaves() []*EnclaveStatusResponse { @@ -580,7 +675,7 @@ type KeyStatusResponse struct { func (x *KeyStatusResponse) Reset() { *x = KeyStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[6] + mi := &file_response_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -593,7 +688,7 @@ func (x *KeyStatusResponse) String() string { func (*KeyStatusResponse) ProtoMessage() {} func (x *KeyStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[6] + mi := &file_response_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -606,7 +701,7 @@ func (x *KeyStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyStatusResponse.ProtoReflect.Descriptor instead. func (*KeyStatusResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{6} + return file_response_proto_rawDescGZIP(), []int{7} } func (x *KeyStatusResponse) GetName() string { @@ -656,7 +751,7 @@ type ListKeysResponse struct { func (x *ListKeysResponse) Reset() { *x = ListKeysResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[7] + mi := &file_response_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -669,7 +764,7 @@ func (x *ListKeysResponse) String() string { func (*ListKeysResponse) ProtoMessage() {} func (x *ListKeysResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[7] + mi := &file_response_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -682,7 +777,7 @@ func (x *ListKeysResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListKeysResponse.ProtoReflect.Descriptor instead. func (*ListKeysResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{7} + return file_response_proto_rawDescGZIP(), []int{8} } func (x *ListKeysResponse) GetKeys() []*KeyStatusResponse { @@ -714,7 +809,7 @@ type EncryptResponse struct { func (x *EncryptResponse) Reset() { *x = EncryptResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[8] + mi := &file_response_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -727,7 +822,7 @@ func (x *EncryptResponse) String() string { func (*EncryptResponse) ProtoMessage() {} func (x *EncryptResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[8] + mi := &file_response_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -740,7 +835,7 @@ func (x *EncryptResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EncryptResponse.ProtoReflect.Descriptor instead. func (*EncryptResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{8} + return file_response_proto_rawDescGZIP(), []int{9} } func (x *EncryptResponse) GetVersion() uint32 { @@ -769,7 +864,7 @@ type DecryptResponse struct { func (x *DecryptResponse) Reset() { *x = DecryptResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[9] + mi := &file_response_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -782,7 +877,7 @@ func (x *DecryptResponse) String() string { func (*DecryptResponse) ProtoMessage() {} func (x *DecryptResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[9] + mi := &file_response_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -795,7 +890,7 @@ func (x *DecryptResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DecryptResponse.ProtoReflect.Descriptor instead. func (*DecryptResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{9} + return file_response_proto_rawDescGZIP(), []int{10} } func (x *DecryptResponse) GetPlaintext() []byte { @@ -824,7 +919,7 @@ type GenerateKeyResponse struct { func (x *GenerateKeyResponse) Reset() { *x = GenerateKeyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[10] + mi := &file_response_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -837,7 +932,7 @@ func (x *GenerateKeyResponse) String() string { func (*GenerateKeyResponse) ProtoMessage() {} func (x *GenerateKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[10] + mi := &file_response_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -850,7 +945,7 @@ func (x *GenerateKeyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GenerateKeyResponse.ProtoReflect.Descriptor instead. func (*GenerateKeyResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{10} + return file_response_proto_rawDescGZIP(), []int{11} } func (x *GenerateKeyResponse) GetVersion() uint32 { @@ -890,7 +985,7 @@ type PolicyStatusResponse struct { func (x *PolicyStatusResponse) Reset() { *x = PolicyStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[11] + mi := &file_response_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -903,7 +998,7 @@ func (x *PolicyStatusResponse) String() string { func (*PolicyStatusResponse) ProtoMessage() {} func (x *PolicyStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[11] + mi := &file_response_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -916,7 +1011,7 @@ func (x *PolicyStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PolicyStatusResponse.ProtoReflect.Descriptor instead. func (*PolicyStatusResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{11} + return file_response_proto_rawDescGZIP(), []int{12} } func (x *PolicyStatusResponse) GetName() string { @@ -964,7 +1059,7 @@ type PolicyResponse struct { func (x *PolicyResponse) Reset() { *x = PolicyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[12] + mi := &file_response_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -977,7 +1072,7 @@ func (x *PolicyResponse) String() string { func (*PolicyResponse) ProtoMessage() {} func (x *PolicyResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[12] + mi := &file_response_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -990,7 +1085,7 @@ func (x *PolicyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PolicyResponse.ProtoReflect.Descriptor instead. func (*PolicyResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{12} + return file_response_proto_rawDescGZIP(), []int{13} } func (x *PolicyResponse) GetName() string { @@ -1040,7 +1135,7 @@ type ListPoliciesResponse struct { func (x *ListPoliciesResponse) Reset() { *x = ListPoliciesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[13] + mi := &file_response_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1053,7 +1148,7 @@ func (x *ListPoliciesResponse) String() string { func (*ListPoliciesResponse) ProtoMessage() {} func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[13] + mi := &file_response_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1066,7 +1161,7 @@ func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPoliciesResponse.ProtoReflect.Descriptor instead. func (*ListPoliciesResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{13} + return file_response_proto_rawDescGZIP(), []int{14} } func (x *ListPoliciesResponse) GetPolicies() []*PolicyStatusResponse { @@ -1102,7 +1197,7 @@ type IdentityResponse struct { func (x *IdentityResponse) Reset() { *x = IdentityResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[14] + mi := &file_response_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1115,7 +1210,7 @@ func (x *IdentityResponse) String() string { func (*IdentityResponse) ProtoMessage() {} func (x *IdentityResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[14] + mi := &file_response_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1128,7 +1223,7 @@ func (x *IdentityResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use IdentityResponse.ProtoReflect.Descriptor instead. func (*IdentityResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{14} + return file_response_proto_rawDescGZIP(), []int{15} } func (x *IdentityResponse) GetIdentity() string { @@ -1192,7 +1287,7 @@ type ListIdentitiesResponse struct { func (x *ListIdentitiesResponse) Reset() { *x = ListIdentitiesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_response_proto_msgTypes[15] + mi := &file_response_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1205,7 +1300,7 @@ func (x *ListIdentitiesResponse) String() string { func (*ListIdentitiesResponse) ProtoMessage() {} func (x *ListIdentitiesResponse) ProtoReflect() protoreflect.Message { - mi := &file_response_proto_msgTypes[15] + mi := &file_response_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1218,7 +1313,7 @@ func (x *ListIdentitiesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListIdentitiesResponse.ProtoReflect.Descriptor instead. func (*ListIdentitiesResponse) Descriptor() ([]byte, []int) { - return file_response_proto_rawDescGZIP(), []int{15} + return file_response_proto_rawDescGZIP(), []int{16} } func (x *ListIdentitiesResponse) GetIdentities() []*IdentityResponse { @@ -1303,143 +1398,158 @@ var file_response_proto_rawDesc = []byte{ 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0xcc, 0x02, 0x0a, 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, - 0x07, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, - 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6e, - 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x75, 0x70, 0x12, 0x4e, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x73, - 0x44, 0x6f, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x69, 0x6e, - 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6e, 0x6f, 0x64, - 0x65, 0x73, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x1a, 0x5b, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x73, - 0x55, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, - 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x44, 0x6f, 0x77, - 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x85, 0x01, 0x0a, 0x15, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x39, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x22, 0x75, 0x0a, 0x14, 0x4c, 0x69, - 0x73, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x73, - 0x12, 0x1f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x61, - 0x74, 0x22, 0xaf, 0x01, 0x0a, 0x11, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x62, 0x79, 0x22, 0x65, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, - 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x1f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x22, 0x4b, 0x0a, 0x0f, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x02, 0x38, 0x01, 0x22, 0xeb, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, + 0x07, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x43, 0x50, 0x55, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x65, 0x61, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x04, 0x68, 0x65, 0x61, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x47, 0x6f, 0x72, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x67, 0x6f, + 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x68, 0x72, 0x65, 0x61, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x12, + 0x1d, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x12, 0x21, + 0x0a, 0x0d, 0x4d, 0x75, 0x74, 0x65, 0x78, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x75, 0x74, 0x65, 0x78, 0x5f, 0x66, 0x72, 0x61, + 0x63, 0x22, 0xcc, 0x02, 0x0a, 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x4e, + 0x6f, 0x64, 0x65, 0x73, 0x55, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, + 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x73, 0x55, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x5f, 0x75, 0x70, 0x12, 0x4e, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x44, 0x6f, + 0x77, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, + 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x73, + 0x44, 0x6f, 0x77, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x1a, 0x5b, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x55, 0x70, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, + 0x6d, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x85, 0x01, 0x0a, 0x15, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, + 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x22, 0x75, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3c, 0x0a, 0x08, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x45, + 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x73, 0x12, 0x1f, + 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x22, + 0xaf, 0x01, 0x0a, 0x11, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, + 0x79, 0x22, 0x65, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, + 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x1f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x65, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x22, 0x4b, 0x0a, 0x0f, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, + 0x72, 0x74, 0x65, 0x78, 0x74, 0x22, 0x2f, 0x0a, 0x0f, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x6c, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x6c, 0x61, + 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x6d, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x69, 0x70, 0x68, 0x65, - 0x72, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x69, 0x70, - 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x22, 0x2f, 0x0a, 0x0f, 0x44, 0x65, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x6c, - 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, - 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x6d, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x6c, 0x61, - 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x6c, - 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x69, 0x70, 0x68, 0x65, - 0x72, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x69, 0x70, - 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, - 0x1d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x22, 0x8e, - 0x03, 0x0a, 0x0e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x12, 0x37, 0x0a, 0x04, 0x44, 0x65, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x6e, 0x79, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x65, 0x6e, 0x79, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x72, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x6c, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, + 0x72, 0x74, 0x65, 0x78, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, 0x1d, 0x0a, + 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x22, 0x8e, 0x03, 0x0a, + 0x0e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x12, + 0x37, 0x0a, 0x04, 0x44, 0x65, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x6e, 0x79, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x04, 0x64, 0x65, 0x6e, 0x79, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x62, 0x79, 0x1a, 0x4c, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x52, 0x75, + 0x6c, 0x65, 0x53, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x6e, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x53, + 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x74, 0x0a, + 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, + 0x5f, 0x61, 0x74, 0x22, 0x97, 0x02, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, + 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x62, 0x79, 0x1a, 0x4c, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, - 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x6e, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x52, 0x75, 0x6c, - 0x65, 0x53, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x74, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x69, 0x6e, 0x69, - 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x10, 0x49, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, + 0x69, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x76, 0x0a, + 0x16, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x69, + 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, - 0x75, 0x65, 0x5f, 0x61, 0x74, 0x22, 0x97, 0x02, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, - 0x65, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x72, 0x69, 0x76, 0x69, - 0x6c, 0x65, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x39, 0x0a, 0x09, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x42, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x10, 0x49, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x12, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, - 0x76, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, - 0x75, 0x65, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, - 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x42, 0x0e, 0x5a, 0x0c, 0x6b, 0x6d, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x65, 0x5f, 0x61, 0x74, 0x42, 0x0e, 0x5a, 0x0c, 0x6b, 0x6d, 0x73, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1454,60 +1564,62 @@ func file_response_proto_rawDescGZIP() []byte { return file_response_proto_rawDescData } -var file_response_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_response_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_response_proto_goTypes = []interface{}{ (*ErrResponse)(nil), // 0: minio.kms.ErrResponse (*VersionResponse)(nil), // 1: minio.kms.VersionResponse (*ServerStatusResponse)(nil), // 2: minio.kms.ServerStatusResponse - (*ClusterStatusResponse)(nil), // 3: minio.kms.ClusterStatusResponse - (*EnclaveStatusResponse)(nil), // 4: minio.kms.EnclaveStatusResponse - (*ListEnclavesResponse)(nil), // 5: minio.kms.ListEnclavesResponse - (*KeyStatusResponse)(nil), // 6: minio.kms.KeyStatusResponse - (*ListKeysResponse)(nil), // 7: minio.kms.ListKeysResponse - (*EncryptResponse)(nil), // 8: minio.kms.EncryptResponse - (*DecryptResponse)(nil), // 9: minio.kms.DecryptResponse - (*GenerateKeyResponse)(nil), // 10: minio.kms.GenerateKeyResponse - (*PolicyStatusResponse)(nil), // 11: minio.kms.PolicyStatusResponse - (*PolicyResponse)(nil), // 12: minio.kms.PolicyResponse - (*ListPoliciesResponse)(nil), // 13: minio.kms.ListPoliciesResponse - (*IdentityResponse)(nil), // 14: minio.kms.IdentityResponse - (*ListIdentitiesResponse)(nil), // 15: minio.kms.ListIdentitiesResponse - nil, // 16: minio.kms.ServerStatusResponse.NodesEntry - nil, // 17: minio.kms.ClusterStatusResponse.NodesUpEntry - nil, // 18: minio.kms.ClusterStatusResponse.NodesDownEntry - nil, // 19: minio.kms.PolicyResponse.AllowEntry - nil, // 20: minio.kms.PolicyResponse.DenyEntry - (*durationpb.Duration)(nil), // 21: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp - (*RuleSet)(nil), // 23: minio.kms.RuleSet + (*ProfileStatusResponse)(nil), // 3: minio.kms.ProfileStatusResponse + (*ClusterStatusResponse)(nil), // 4: minio.kms.ClusterStatusResponse + (*EnclaveStatusResponse)(nil), // 5: minio.kms.EnclaveStatusResponse + (*ListEnclavesResponse)(nil), // 6: minio.kms.ListEnclavesResponse + (*KeyStatusResponse)(nil), // 7: minio.kms.KeyStatusResponse + (*ListKeysResponse)(nil), // 8: minio.kms.ListKeysResponse + (*EncryptResponse)(nil), // 9: minio.kms.EncryptResponse + (*DecryptResponse)(nil), // 10: minio.kms.DecryptResponse + (*GenerateKeyResponse)(nil), // 11: minio.kms.GenerateKeyResponse + (*PolicyStatusResponse)(nil), // 12: minio.kms.PolicyStatusResponse + (*PolicyResponse)(nil), // 13: minio.kms.PolicyResponse + (*ListPoliciesResponse)(nil), // 14: minio.kms.ListPoliciesResponse + (*IdentityResponse)(nil), // 15: minio.kms.IdentityResponse + (*ListIdentitiesResponse)(nil), // 16: minio.kms.ListIdentitiesResponse + nil, // 17: minio.kms.ServerStatusResponse.NodesEntry + nil, // 18: minio.kms.ClusterStatusResponse.NodesUpEntry + nil, // 19: minio.kms.ClusterStatusResponse.NodesDownEntry + nil, // 20: minio.kms.PolicyResponse.AllowEntry + nil, // 21: minio.kms.PolicyResponse.DenyEntry + (*durationpb.Duration)(nil), // 22: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp + (*RuleSet)(nil), // 24: minio.kms.RuleSet } var file_response_proto_depIdxs = []int32{ - 21, // 0: minio.kms.ServerStatusResponse.UpTime:type_name -> google.protobuf.Duration - 16, // 1: minio.kms.ServerStatusResponse.Nodes:type_name -> minio.kms.ServerStatusResponse.NodesEntry - 21, // 2: minio.kms.ServerStatusResponse.LastHeartbeat:type_name -> google.protobuf.Duration - 21, // 3: minio.kms.ServerStatusResponse.HeartbeatInterval:type_name -> google.protobuf.Duration - 21, // 4: minio.kms.ServerStatusResponse.ElectionTimeout:type_name -> google.protobuf.Duration - 17, // 5: minio.kms.ClusterStatusResponse.NodesUp:type_name -> minio.kms.ClusterStatusResponse.NodesUpEntry - 18, // 6: minio.kms.ClusterStatusResponse.NodesDown:type_name -> minio.kms.ClusterStatusResponse.NodesDownEntry - 22, // 7: minio.kms.EnclaveStatusResponse.CreatedAt:type_name -> google.protobuf.Timestamp - 4, // 8: minio.kms.ListEnclavesResponse.Enclaves:type_name -> minio.kms.EnclaveStatusResponse - 22, // 9: minio.kms.KeyStatusResponse.CreatedAt:type_name -> google.protobuf.Timestamp - 6, // 10: minio.kms.ListKeysResponse.Keys:type_name -> minio.kms.KeyStatusResponse - 22, // 11: minio.kms.PolicyStatusResponse.CreatedAt:type_name -> google.protobuf.Timestamp - 19, // 12: minio.kms.PolicyResponse.Allow:type_name -> minio.kms.PolicyResponse.AllowEntry - 20, // 13: minio.kms.PolicyResponse.Deny:type_name -> minio.kms.PolicyResponse.DenyEntry - 22, // 14: minio.kms.PolicyResponse.CreatedAt:type_name -> google.protobuf.Timestamp - 11, // 15: minio.kms.ListPoliciesResponse.Policies:type_name -> minio.kms.PolicyStatusResponse - 22, // 16: minio.kms.IdentityResponse.CreatedAt:type_name -> google.protobuf.Timestamp - 14, // 17: minio.kms.ListIdentitiesResponse.Identities:type_name -> minio.kms.IdentityResponse - 2, // 18: minio.kms.ClusterStatusResponse.NodesUpEntry.value:type_name -> minio.kms.ServerStatusResponse - 23, // 19: minio.kms.PolicyResponse.AllowEntry.value:type_name -> minio.kms.RuleSet - 23, // 20: minio.kms.PolicyResponse.DenyEntry.value:type_name -> minio.kms.RuleSet - 21, // [21:21] is the sub-list for method output_type - 21, // [21:21] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name + 22, // 0: minio.kms.ServerStatusResponse.UpTime:type_name -> google.protobuf.Duration + 17, // 1: minio.kms.ServerStatusResponse.Nodes:type_name -> minio.kms.ServerStatusResponse.NodesEntry + 22, // 2: minio.kms.ServerStatusResponse.LastHeartbeat:type_name -> google.protobuf.Duration + 22, // 3: minio.kms.ServerStatusResponse.HeartbeatInterval:type_name -> google.protobuf.Duration + 22, // 4: minio.kms.ServerStatusResponse.ElectionTimeout:type_name -> google.protobuf.Duration + 23, // 5: minio.kms.ProfileStatusResponse.Started:type_name -> google.protobuf.Timestamp + 18, // 6: minio.kms.ClusterStatusResponse.NodesUp:type_name -> minio.kms.ClusterStatusResponse.NodesUpEntry + 19, // 7: minio.kms.ClusterStatusResponse.NodesDown:type_name -> minio.kms.ClusterStatusResponse.NodesDownEntry + 23, // 8: minio.kms.EnclaveStatusResponse.CreatedAt:type_name -> google.protobuf.Timestamp + 5, // 9: minio.kms.ListEnclavesResponse.Enclaves:type_name -> minio.kms.EnclaveStatusResponse + 23, // 10: minio.kms.KeyStatusResponse.CreatedAt:type_name -> google.protobuf.Timestamp + 7, // 11: minio.kms.ListKeysResponse.Keys:type_name -> minio.kms.KeyStatusResponse + 23, // 12: minio.kms.PolicyStatusResponse.CreatedAt:type_name -> google.protobuf.Timestamp + 20, // 13: minio.kms.PolicyResponse.Allow:type_name -> minio.kms.PolicyResponse.AllowEntry + 21, // 14: minio.kms.PolicyResponse.Deny:type_name -> minio.kms.PolicyResponse.DenyEntry + 23, // 15: minio.kms.PolicyResponse.CreatedAt:type_name -> google.protobuf.Timestamp + 12, // 16: minio.kms.ListPoliciesResponse.Policies:type_name -> minio.kms.PolicyStatusResponse + 23, // 17: minio.kms.IdentityResponse.CreatedAt:type_name -> google.protobuf.Timestamp + 15, // 18: minio.kms.ListIdentitiesResponse.Identities:type_name -> minio.kms.IdentityResponse + 2, // 19: minio.kms.ClusterStatusResponse.NodesUpEntry.value:type_name -> minio.kms.ServerStatusResponse + 24, // 20: minio.kms.PolicyResponse.AllowEntry.value:type_name -> minio.kms.RuleSet + 24, // 21: minio.kms.PolicyResponse.DenyEntry.value:type_name -> minio.kms.RuleSet + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_response_proto_init() } @@ -1554,7 +1666,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterStatusResponse); i { + switch v := v.(*ProfileStatusResponse); i { case 0: return &v.state case 1: @@ -1566,7 +1678,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnclaveStatusResponse); i { + switch v := v.(*ClusterStatusResponse); i { case 0: return &v.state case 1: @@ -1578,7 +1690,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEnclavesResponse); i { + switch v := v.(*EnclaveStatusResponse); i { case 0: return &v.state case 1: @@ -1590,7 +1702,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyStatusResponse); i { + switch v := v.(*ListEnclavesResponse); i { case 0: return &v.state case 1: @@ -1602,7 +1714,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListKeysResponse); i { + switch v := v.(*KeyStatusResponse); i { case 0: return &v.state case 1: @@ -1614,7 +1726,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EncryptResponse); i { + switch v := v.(*ListKeysResponse); i { case 0: return &v.state case 1: @@ -1626,7 +1738,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecryptResponse); i { + switch v := v.(*EncryptResponse); i { case 0: return &v.state case 1: @@ -1638,7 +1750,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateKeyResponse); i { + switch v := v.(*DecryptResponse); i { case 0: return &v.state case 1: @@ -1650,7 +1762,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolicyStatusResponse); i { + switch v := v.(*GenerateKeyResponse); i { case 0: return &v.state case 1: @@ -1662,7 +1774,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolicyResponse); i { + switch v := v.(*PolicyStatusResponse); i { case 0: return &v.state case 1: @@ -1674,7 +1786,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPoliciesResponse); i { + switch v := v.(*PolicyResponse); i { case 0: return &v.state case 1: @@ -1686,7 +1798,7 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IdentityResponse); i { + switch v := v.(*ListPoliciesResponse); i { case 0: return &v.state case 1: @@ -1698,6 +1810,18 @@ func file_response_proto_init() { } } file_response_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IdentityResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_response_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListIdentitiesResponse); i { case 0: return &v.state @@ -1716,7 +1840,7 @@ func file_response_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_response_proto_rawDesc, NumEnums: 0, - NumMessages: 21, + NumMessages: 22, NumExtensions: 0, NumServices: 0, }, diff --git a/kms/protobuf/response.proto b/kms/protobuf/response.proto index 898937b..b67b7c0 100644 --- a/kms/protobuf/response.proto +++ b/kms/protobuf/response.proto @@ -122,6 +122,41 @@ message ServerStatusResponse { uint64 StackMemInUse = 18 [ json_name="sys_mem_stack_used" ]; } +message ProfileStatusResponse { + // Started is the point in time when profiling was enabled. + google.protobuf.Timestamp Started = 1 [ json_name = "started" ]; + + // CPU indicates whether the server is capturing a CPU profile. + bool CPU = 2 [ json_name = "cpu" ]; + + // Heap indicates whether the server is capturing a heap memory profile. + bool Heap = 3 [ json_name = "heap" ]; + + // Goroutine indicates whether the server is capturing a runtime go + // routine profile. + bool Goroutine = 4 [ json_name = "goroutine" ]; + + // Goroutine indicates whether the server is capturing a OS thread + // profile. + bool Thread = 5 [ json_name = "thread" ]; + + // BlockRate is the fraction of runtime blocking events, like a + // go routine getting blocked, collected by the server's block + // profile. On average, the server samples one blocking event per + // BlockRate nanoseconds spent blocked. + // + // If 0, block profiling is disabled. + uint32 BlockRate = 6 [ json_name = "block_rate" ]; + + // MutexFraction is the fraction of mutex contention events, + // like waiting to accquire a lock, collected by the server's + // mutex profile. On average, the server collects 1/MutexFraction + // events in its mutex profile. + // + // If 0, mutex profiling is disabled. + uint32 MutexFraction = 7 [ json_name = "mutex_frac" ]; + } + message ClusterStatusResponse { map NodesUp = 1 [ json_name="nodes_up" ]; map NodesDown = 2 [ json_name="nodes_down" ]; diff --git a/kms/protobuf/rule.pb.go b/kms/protobuf/rule.pb.go index b34818c..14eeef1 100644 --- a/kms/protobuf/rule.pb.go +++ b/kms/protobuf/rule.pb.go @@ -9,8 +9,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.25.2 +// protoc-gen-go v1.33.0 +// protoc v5.26.1 // source: rule.proto package protobuf diff --git a/kms/request.go b/kms/request.go index 22b28d1..666c029 100644 --- a/kms/request.go +++ b/kms/request.go @@ -142,6 +142,36 @@ func (r *ClusterStatusRequest) MarshalPB(*pb.ClusterStatusRequest) error { retur // UnmarshalPB initializes the ClusterStatusRequest from its protobuf representation. func (r *ClusterStatusRequest) UnmarshalPB(*pb.ClusterStatusRequest) error { return nil } +// ProfileRequest contains options for customizing performance profiling. +type ProfileRequest struct { + // Host on which performance profiling should be enabled. + Host string + + // CPU enables or disables CPU profiling. + CPU bool + + // Heap enables or disables heap memory profiling. + Heap bool + + // Goroutine enables or disables runtime thread profiling. + Goroutine bool + + // Goroutine enables or disables OS thread profiling. + Thread bool + + // BlockRate enables or disables block profiling. If > 0, + // the server tries to sample sample one blocking event + // per BlockRate nanoseconds spent blocked. + BlockRate int + + // MutexFraction enables or disables mutex profiling. If > 0, + // the server reports, on average, 1/MutexFraction events in + // its mutex profile. + // + // If set to 1, every mutex block event is reported. + MutexFraction int +} + // AddClusterNodeRequest describes which KMS server to add to an existing. type AddClusterNodeRequest struct { // Host is the KMS server that should join a cluster. diff --git a/kms/response.go b/kms/response.go index e680198..8fd7a9b 100644 --- a/kms/response.go +++ b/kms/response.go @@ -302,6 +302,64 @@ func (s *ServerStatusResponse) UnmarshalPB(v *pb.ServerStatusResponse) error { return nil } +// ProfileStatusResponse contains profiling status information about +// KMS server. +type ProfileStatusResponse struct { + // Started is the point in time when the profiling was stated. + Started time.Time + + // CPU indicates whether CPU profiling is enabled. + CPU bool + + // Heap indicates whether heap memory profiling is enabled. + Heap bool + + // Goroutine indicates whether go routine profiling is enabled. + Goroutine bool + + // Thread indicates whether OS thread profiling is enabled. + Thread bool + + // BlockRate is the fraction of runtime blocking events, like + // a go routine getting blocked, collected by the server. On + // average, the server sample one blocking event per BlockRate + // nanoseconds spent blocked. + BlockRate int + + // MutexFraction is the fraction of mutex contention events, + // like waiting to accquire a lock, collected by the server. + // On average, the server reports 1/MutexFraction events in + // its mutex profile. + // + // If 1, the server collects every event and if 0 mutex + // profiling is disabled. + MutexFraction int +} + +// MarshalPB converts the ProfileStatusResponse into its protobuf representation. +func (s *ProfileStatusResponse) MarshalPB(v *pb.ProfileStatusResponse) error { + v.Started = pb.Time(s.Started) + v.CPU = s.CPU + v.Heap = s.Heap + v.Goroutine = s.Goroutine + v.Thread = s.Thread + v.BlockRate = uint32(s.BlockRate) + v.MutexFraction = uint32(s.MutexFraction) + return nil +} + +// UnmarshalPB initializes the ProfileStatusResponse from its protobuf representation. +func (s *ProfileStatusResponse) UnmarshalPB(v *pb.ProfileStatusResponse) error { + s.Started = v.Started.AsTime() + s.CPU = v.CPU + s.Heap = v.Heap + s.Goroutine = v.Goroutine + s.Thread = v.Thread + s.BlockRate = int(v.BlockRate) + s.MutexFraction = int(v.MutexFraction) + return nil +} + // ClusterStatusResponse contains status information about a KMS cluster. // // The overall view of the current cluster status, in particular @@ -391,6 +449,27 @@ func (r gzipReadCloser) Close() error { return err } +// ProfileResponse is the result of a profiling operation. +// It's a TAR archive containing one pprof file for each +// profile type, like CPU, heap memory a.s.o. +type ProfileResponse struct { + Body io.ReadCloser +} + +// Read reads data from the response body into b. +func (r *ProfileResponse) Read(b []byte) (int, error) { + n, err := r.Body.Read(b) + if errors.Is(err, io.EOF) { + r.Body.Close() + } + return n, err +} + +// Close closes the underlying response body. +func (r *ProfileResponse) Close() error { + return r.Body.Close() +} + // EnclaveStatusResponse contains information about an enclave. type EnclaveStatusResponse struct { // Name is the name of the enclave.