agent

package
v0.0.0-...-7d57428 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendErrors

func AppendErrors(err error, errs ...error) error

wrapper around multierror.Append that enforces the invariant that if all input errors are nil, the output error is nil (allowing validation without branching).

func CheckDNS1123Preconditions

func CheckDNS1123Preconditions(name string) error

encapsulates DNS 1123 checks common to both wildcarded hosts and FQDNs

func ValidateConnectTimeout

func ValidateConnectTimeout(timeout *durationpb.Duration) error

ValidateConnectTimeout validates the envoy connection timeout

func ValidateControlPlaneAuthPolicy

func ValidateControlPlaneAuthPolicy(policy meshconfig.AuthenticationPolicy) error

func ValidateDNS1123Labels

func ValidateDNS1123Labels(domain string) error

func ValidateDatadogCollector

func ValidateDatadogCollector(d *meshconfig.Tracing_Datadog) error

ValidateDatadogCollector validates the configuration for sending envoy spans to Datadog

func ValidateDrainDuration

func ValidateDrainDuration(drainTime *durationpb.Duration) (errs error)

ValidateDrainDuration checks that parent and drain durations are valid

func ValidateDuration

func ValidateDuration(pd *durationpb.Duration) error

ValidateDuration checks that a proto duration is well-formed

func ValidateDurationRange

func ValidateDurationRange(dur, minimum, maximum time.Duration) error

ValidateDurationRange verifies range is in specified duration

func ValidateExtensionProviderTracingOpentelemetry

func ValidateExtensionProviderTracingOpentelemetry(provider *meshconfig.MeshConfig_ExtensionProvider_OpenTelemetryTracingProvider) (errs error)

func ValidateFQDN

func ValidateFQDN(fqdn string) error

ValidateFQDN checks a fully-qualified domain name

func ValidateIPAddress

func ValidateIPAddress(addr string) error

ValidateIPAddress validates that a string in "CIDR notation" or "Dot-decimal notation"

func ValidateIPSubnet

func ValidateIPSubnet(subnet string) error

ValidateIPSubnet checks that a string is in "CIDR notation" or "Dot-decimal notation"

func ValidateLightstepCollector

func ValidateLightstepCollector(ls *meshconfig.Tracing_Lightstep) error

ValidateLightstepCollector validates the configuration for sending envoy spans to LightStep

func ValidateMeshConfigProxyConfig

func ValidateMeshConfigProxyConfig(config *meshconfig.ProxyConfig) (errs error)

ValidateMeshConfigProxyConfig checks that the mesh config is well-formed

func ValidateMeshNetworks

func ValidateMeshNetworks(meshnetworks *meshconfig.MeshNetworks) (errs error)

ValidateMeshNetworks validates meshnetworks.

func ValidateMeshTLSConfig

func ValidateMeshTLSConfig(mesh *meshconfig.MeshConfig) (errs error)

func ValidateNamespaceSlashWildcardHostname

func ValidateNamespaceSlashWildcardHostname(hostname string, isGateway bool, gatewaySemantics bool) (errs error)

func ValidatePartialWildCard

func ValidatePartialWildCard(host string) error

func ValidatePort

func ValidatePort(port int) error

ValidatePort checks that the network port is in range

func ValidateProtocolDetectionTimeout

func ValidateProtocolDetectionTimeout(timeout *durationpb.Duration) error

ValidateProtocolDetectionTimeout validates the envoy protocol detection timeout

func ValidateProxyAddress

func ValidateProxyAddress(hostAddr string) error

ValidateProxyAddress checks that a network address is well-formed

func ValidateTLS

func ValidateTLS(settings *networking.ClientTLSSettings) (errs error)

func ValidateTrustDomain

func ValidateTrustDomain(domain string) error

validate the trust domain format

func ValidateWildcardDomain

func ValidateWildcardDomain(domain string) error

ValidateWildcardDomain checks that a domain is a valid FQDN, but also allows wildcard prefixes.

func ValidateWildcardDomainForVirtualServiceBoundToGateway

func ValidateWildcardDomainForVirtualServiceBoundToGateway(sni bool, domain string) error

ValidateWildcardDomainForVirtualServiceBoundToGateway checks that a domain is a valid FQDN, but also allows wildcard prefixes. If it is an SNI domain, then it does a special validation where it allows a which matches outbound_.<PORT>_._.<HOSTNAME> format

func ValidateZipkinCollector

func ValidateZipkinCollector(z *meshconfig.Tracing_Zipkin) error

ValidateZipkinCollector validates the configuration for sending envoy spans to Zipkin

Types

type Validation

type Validation struct {
	Err     error
	Warning Warning
}

Validation holds errors and warnings. They can be joined with additional errors by called AppendValidation

func AppendValidation

func AppendValidation(v Validation, vs ...error) Validation

wrapper around multierror.Append that enforces the invariant that if all input errors are nil, the output error is nil (allowing validation without branching).

func AppendWarningf

func AppendWarningf(v Validation, format string, a ...any) Validation

AppendWarningf appends a formatted warning string nolint: unparam

func ValidateLocalityLbSetting

func ValidateLocalityLbSetting(lb *networking.LocalityLoadBalancerSetting, outlier *networking.OutlierDetection) (errs Validation)

ValidateLocalityLbSetting checks the LocalityLbSetting of MeshConfig

func ValidateMeshTLSDefaults

func ValidateMeshTLSDefaults(mesh *meshconfig.MeshConfig) (v Validation)

func Warningf

func Warningf(format string, a ...any) Validation

Warningf formats according to a format specifier and returns the string as a value that satisfies error. Like Errorf, but for warnings.

func WrapWarning

func WrapWarning(e error) Validation

WrapWarning turns an error into a Validation as a warning

func (Validation) Error

func (v Validation) Error() string

func (Validation) Unwrap

func (v Validation) Unwrap() (Warning, error)

type Warning

type Warning error

func ValidateMeshConfig

func ValidateMeshConfig(mesh *meshconfig.MeshConfig) (Warning, error)

ValidateMeshConfig checks that the mesh config is well-formed

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL