func BuildEdgesRequest(p EdgesRequestParams) (*pb.EdgesRequest, error)
BuildEdgesRequest builds a Public API EdgesRequest from a EdgesRequestParams.
func BuildStatSummaryRequest(p StatsSummaryRequestParams) (*pb.StatSummaryRequest, error)
BuildStatSummaryRequest builds a Public API StatSummaryRequest from a StatsSummaryRequestParams.
func BuildTopRoutesRequest(p TopRoutesRequestParams) (*pb.TopRoutesRequest, error)
BuildTopRoutesRequest builds a Public API TopRoutesRequest from a TopRoutesRequestParams.
func K8sPodToPublicPod(pod corev1.Pod, ownerKind string, ownerName string) *pb.Pod
K8sPodToPublicPod converts a Kubernetes Pod to a Public API Pod
func ValidateTimeWindow(window string) (string, error)
ValidateTimeWindow validates the given duration as a time window. If an empty string is provided, the default time window is returned, otherwise, if validation is successful, the original time window is returned.
EdgesRequestParams contains parameters that are used to build Edges requests.
type EdgesRequestParams struct { Namespace string ResourceType string AllNamespaces bool }
GatewayRequestParams contains parameters that are used to build a GatewayRequest
type GatewayRequestParams struct { RemoteClusterName string GatewayNamespace string TimeWindow string }
StatsBaseRequestParams contains parameters that are used to build requests for metrics data. This includes requests to StatSummary and TopRoutes.
type StatsBaseRequestParams struct { TimeWindow string Namespace string ResourceType string ResourceName string AllNamespaces bool }
StatsSummaryRequestParams contains parameters that are used to build StatSummary requests.
type StatsSummaryRequestParams struct { StatsBaseRequestParams ToNamespace string ToType string ToName string FromNamespace string FromType string FromName string SkipStats bool TCPStats bool LabelSelector string }
TopRoutesRequestParams contains parameters that are used to build TopRoutes requests.
type TopRoutesRequestParams struct { StatsBaseRequestParams ToNamespace string ToType string ToName string LabelSelector string }