Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateDownstreamTargets ¶
func ValidateDownstreamTargets(targets []runsv1alpha1.DownstreamTarget) error
ValidateDownstreamTargets ensures each target selects exactly one transport mode and validates GRPC endpoint format.
Behavior:
- Returns an error if a target does not set exactly one of grpc or terminate.
- For GRPC targets, validates that the endpoint is a valid host:port format.
- Supports both DNS names (service.namespace.svc:9000) and IP addresses.
Arguments:
- targets []runsv1alpha1.DownstreamTarget: the list of downstream targets to validate.
Returns:
- error: describes the first validation failure, or nil if all targets are valid.
func ValidateGRPCEndpoint ¶
ValidateGRPCEndpoint validates that an endpoint string is a valid gRPC target address.
Behavior:
- Accepts formats: "host:port", "hostname.namespace.svc:port", "ip:port".
- Rejects empty endpoints, missing ports, and invalid port numbers.
- Does not require the endpoint to be reachable (syntax check only).
Arguments:
- endpoint string: the gRPC endpoint to validate.
Returns:
- error: describes the validation failure, or nil if the endpoint is valid.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.