You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/proto-public/pbmesh/v1alpha1/computed_routes.proto

100 lines
2.6 KiB

// Copyright (c) HashiCorp, Inc.
// 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;
}