Documentation ¶
Index ¶
- func AppendErrors(err error, errs ...error) error
- func CheckDNS1123Preconditions(name string) error
- func ValidateConnectTimeout(timeout *durationpb.Duration) error
- func ValidateControlPlaneAuthPolicy(policy meshconfig.AuthenticationPolicy) error
- func ValidateDNS1123Labels(domain string) error
- func ValidateDatadogCollector(d *meshconfig.Tracing_Datadog) error
- func ValidateDrainDuration(drainTime *durationpb.Duration) (errs error)
- func ValidateDuration(pd *durationpb.Duration) error
- func ValidateDurationRange(dur, minimum, maximum time.Duration) error
- func ValidateExtensionProviderEnvoyExtAuthzGRPC(...) (errs error)
- func ValidateExtensionProviderEnvoyExtAuthzHTTP(...) (errs error)
- func ValidateExtensionProviderEnvoyHTTPAls(provider *meshconfig.MeshConfig_ExtensionProvider_EnvoyHttpGrpcV3LogProvider) (errs error)
- func ValidateExtensionProviderEnvoyOtelAls(...) (errs error)
- func ValidateExtensionProviderEnvoyTCPAls(provider *meshconfig.MeshConfig_ExtensionProvider_EnvoyTcpGrpcV3LogProvider) (errs error)
- func ValidateExtensionProviderTracingOpentelemetry(provider *meshconfig.MeshConfig_ExtensionProvider_OpenTelemetryTracingProvider) (errs error)
- func ValidateFQDN(fqdn string) error
- func ValidateIPAddress(addr string) error
- func ValidateIPSubnet(subnet string) error
- func ValidateLightstepCollector(ls *meshconfig.Tracing_Lightstep) error
- func ValidateMeshConfigProxyConfig(config *meshconfig.ProxyConfig) (errs error)
- func ValidateMeshNetworks(meshnetworks *meshconfig.MeshNetworks) (errs error)
- func ValidateMeshTLSConfig(mesh *meshconfig.MeshConfig) (errs error)
- func ValidateNamespaceSlashWildcardHostname(hostname string, isGateway bool, gatewaySemantics bool) (errs error)
- func ValidatePartialWildCard(host string) error
- func ValidatePort(port int) error
- func ValidateProtocolDetectionTimeout(timeout *durationpb.Duration) error
- func ValidateProxyAddress(hostAddr string) error
- func ValidateTLS(settings *networking.ClientTLSSettings) (errs error)
- func ValidateTrustDomain(domain string) error
- func ValidateWildcardDomain(domain string) error
- func ValidateWildcardDomainForVirtualServiceBoundToGateway(sni bool, domain string) error
- func ValidateZipkinCollector(z *meshconfig.Tracing_Zipkin) error
- type Validation
- func AppendValidation(v Validation, vs ...error) Validation
- func AppendWarningf(v Validation, format string, a ...any) Validation
- func ValidateLocalityLbSetting(lb *networking.LocalityLoadBalancerSetting, ...) (errs Validation)
- func ValidateMeshTLSDefaults(mesh *meshconfig.MeshConfig) (v Validation)
- func Warningf(format string, a ...any) Validation
- func WrapWarning(e error) Validation
- type Warning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendErrors ¶
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 ¶
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 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 ¶
ValidateDurationRange verifies range is in specified duration
func ValidateExtensionProviderEnvoyExtAuthzGRPC ¶
func ValidateExtensionProviderEnvoyExtAuthzGRPC(config *meshconfig.MeshConfig_ExtensionProvider_EnvoyExternalAuthorizationGrpcProvider) (errs error)
func ValidateExtensionProviderEnvoyExtAuthzHTTP ¶
func ValidateExtensionProviderEnvoyExtAuthzHTTP(config *meshconfig.MeshConfig_ExtensionProvider_EnvoyExternalAuthorizationHttpProvider) (errs error)
func ValidateExtensionProviderEnvoyHTTPAls ¶
func ValidateExtensionProviderEnvoyHTTPAls(provider *meshconfig.MeshConfig_ExtensionProvider_EnvoyHttpGrpcV3LogProvider) (errs error)
func ValidateExtensionProviderEnvoyOtelAls ¶
func ValidateExtensionProviderEnvoyOtelAls(provider *meshconfig.MeshConfig_ExtensionProvider_EnvoyOpenTelemetryLogProvider) (errs error)
func ValidateExtensionProviderEnvoyTCPAls ¶
func ValidateExtensionProviderEnvoyTCPAls(provider *meshconfig.MeshConfig_ExtensionProvider_EnvoyTcpGrpcV3LogProvider) (errs error)
func ValidateExtensionProviderTracingOpentelemetry ¶
func ValidateExtensionProviderTracingOpentelemetry(provider *meshconfig.MeshConfig_ExtensionProvider_OpenTelemetryTracingProvider) (errs error)
func ValidateFQDN ¶
ValidateFQDN checks a fully-qualified domain name
func ValidateIPAddress ¶
ValidateIPAddress validates that a string in "CIDR notation" or "Dot-decimal notation"
func ValidateIPSubnet ¶
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 ValidatePartialWildCard ¶
func ValidatePort ¶
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 ¶
ValidateProxyAddress checks that a network address is well-formed
func ValidateTLS ¶
func ValidateTLS(settings *networking.ClientTLSSettings) (errs error)
func ValidateTrustDomain ¶
validate the trust domain format
func ValidateWildcardDomain ¶
ValidateWildcardDomain checks that a domain is a valid FQDN, but also allows wildcard prefixes.
func ValidateWildcardDomainForVirtualServiceBoundToGateway ¶
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 ¶
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