consul/proto-public/pbmesh/v1alpha1/computed_routes.proto

100 lines
2.6 KiB
Protocol Buffer
Raw Normal View History

// Copyright (c) HashiCorp, Inc.
[COMPLIANCE] License changes (#18443) * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at <Blog URL>, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-08-11 13:12:13 +00:00
// SPDX-License-Identifier: BUSL-1.1
syntax = "proto3";
package hashicorp.consul.mesh.v1alpha1;
import "pbcatalog/v1alpha1/failover_policy.proto";
import "pbcatalog/v1alpha1/service.proto";
import "pbmesh/v1alpha1/common.proto";
import "pbmesh/v1alpha1/destination_policy.proto";
import "pbmesh/v1alpha1/grpc_route.proto";
import "pbmesh/v1alpha1/http_route.proto";
import "pbmesh/v1alpha1/http_route_retries.proto";
import "pbmesh/v1alpha1/http_route_timeouts.proto";
// This is a Resource type.
message ComputedRoutes {
map<string, ComputedPortRoutes> ported_configs = 1;
}
message ComputedPortRoutes {
oneof config {
InterpretedHTTPRoute http = 1;
InterpretedGRPCRoute grpc = 2;
InterpretedTCPRoute tcp = 3;
}
bool using_default_config = 4; // TODO
// map key is an opaque string; like disco chain target name
map<string, BackendTargetDetails> targets = 5;
}
message InterpretedHTTPRoute {
ParentReference parent_ref = 1;
reserved 2; // hostnames
repeated InterpretedHTTPRouteRule rules = 3;
}
message InterpretedHTTPRouteRule {
repeated HTTPRouteMatch matches = 1;
repeated HTTPRouteFilter filters = 2;
repeated InterpretedHTTPBackendRef backend_refs = 3;
HTTPRouteTimeouts timeouts = 4;
HTTPRouteRetries retries = 5;
}
message InterpretedHTTPBackendRef {
string backend_target = 1;
uint32 weight = 2;
repeated HTTPRouteFilter filters = 3;
}
message InterpretedGRPCRoute {
ParentReference parent_ref = 1;
reserved 2; // hostnames
repeated InterpretedGRPCRouteRule rules = 3;
}
message InterpretedGRPCRouteRule {
repeated GRPCRouteMatch matches = 1;
repeated GRPCRouteFilter filters = 2;
repeated InterpretedGRPCBackendRef backend_refs = 3;
HTTPRouteTimeouts timeouts = 4;
HTTPRouteRetries retries = 5;
}
message InterpretedGRPCBackendRef {
string backend_target = 1;
uint32 weight = 2;
repeated GRPCRouteFilter filters = 3;
}
message InterpretedTCPRoute {
ParentReference parent_ref = 1;
repeated InterpretedTCPRouteRule rules = 2;
}
message InterpretedTCPRouteRule {
repeated InterpretedTCPBackendRef backend_refs = 1;
}
// TODO: look into smuggling the target through a different typeURL, or just
// skip in favor of letting the caller do their own lookups?
message InterpretedTCPBackendRef {
string backend_target = 1;
uint32 weight = 2;
}
message BackendTargetDetails {
// identity info
BackendReference backend_ref = 1;
bool null_route_traffic = 2;
hashicorp.consul.catalog.v1alpha1.Service service = 3;
hashicorp.consul.catalog.v1alpha1.FailoverPolicy failover_policy = 4;
DestinationPolicy destination_policy = 5;
}