Documentation ¶
Index ¶
- Constants
- Variables
- func ClusterLoadAssignmentName(service types.NamespacedName, portName string) string
- func NewServer(registry *prometheus.Registry, opts ...grpc.ServerOption) *grpc.Server
- func Rewrite(in proto.Message) proto.Message
- type ConstantHashV2
- type ConstantHashV3
- type Counter
- type Resource
Constants ¶
const CONSTANT_HASH_VALUE = "contour"
Variables ¶
var TypeMapping map[string]string
TypeMapping maps xDS type URLs from v2 to v3.
Functions ¶
func ClusterLoadAssignmentName ¶ added in v1.9.0
func ClusterLoadAssignmentName(service types.NamespacedName, portName string) string
ClusterLoadAssignmentName generates the name used for an EDS ClusterLoadAssignment, given a fully qualified Service name and port. This name is a contract between the producer of a cluster (i.e. the EDS service) and the consumer of a cluster (most likely a HTTP Route Action).
func NewServer ¶ added in v1.10.0
func NewServer(registry *prometheus.Registry, opts ...grpc.ServerOption) *grpc.Server
If registry is non-nil gRPC server metrics will be automatically configured and enabled.
func Rewrite ¶ added in v1.10.0
Rewrite changes the given xDS message to use the v3 xDS API.
Since the v2 and v3 APIs are wire-compatible, we just rewrite the type names for type URLs in any.Any messages. This allows Envoy to do the actual conversion, and Envoy takes care of migrating deprecated fields.
Types ¶
type ConstantHashV2 ¶ added in v1.10.0
type ConstantHashV2 struct{}
ConstantHashV2 is a specialized node ID hasher used to allow any instance of Envoy to connect to Contour regardless of the service-node flag configured on Envoy.
func (ConstantHashV2) ID ¶ added in v1.10.0
func (c ConstantHashV2) ID(*envoy_api_core_v2.Node) string
func (ConstantHashV2) String ¶ added in v1.10.0
func (c ConstantHashV2) String() string
type ConstantHashV3 ¶ added in v1.10.0
type ConstantHashV3 struct{}
ConstantHashV3 is the same as ConstantHashV2 but for xDS v3.
func (ConstantHashV3) ID ¶ added in v1.10.0
func (c ConstantHashV3) ID(*envoy_config_v3.Node) string
func (ConstantHashV3) String ¶ added in v1.10.0
func (c ConstantHashV3) String() string
type Counter ¶ added in v1.10.0
type Counter uint64
Counter holds an atomically incrementing counter.
type Resource ¶
type Resource interface { // Contents returns the contents of this resource. Contents() []proto.Message // Query returns an entry for each resource name supplied. Query(names []string) []proto.Message // Register registers ch to receive a value when Notify is called. Register(chan int, int, ...string) // TypeURL returns the typeURL of messages returned from Values. TypeURL() string }
Resource represents a source of proto.Messages that can be registered for interest.