Documentation ¶
Index ¶
- type ApplyGlobalTrafficPolicyRequest
- type ApplyGlobalTrafficPolicyResponse
- type ApplyHTTPRouteRequest
- type ApplyHTTPRouteResponse
- type ApplyMeshPolicyInput
- type ApplyPolicyPeersInput
- type ApplySidecarEgressInput
- type ApplySidecarEgressResponse
- type AttachPeerClusterRequest
- type AuthPortSelectorInput
- type AuthTLSModeInput
- type Client
- type ClientOption
- type Cluster
- type ClusterStatus
- type ClustersResponse
- type DisableAutoSidecarInjectionRequest
- type DisableAutoSidecarInjectionResponse
- type DisableGlobalTrafficPolicyRequest
- type DisableGlobalTrafficPolicyResponse
- type DisableHTTPRouteRequest
- type DisableHTTPRouteResponse
- type DisablePolicyPeersInput
- type DisableSidecarEgressInput
- type DisableSidecarEgressResponse
- type Egress
- type EnableAutoSidecarInjectionRequest
- type EnableAutoSidecarInjectionResponse
- type GenerateLoadRequest
- type GenerateLoadResponse
- type GetAccessLogsInput
- type HTTPHeaderMatch
- type HTTPRouteSelector
- type HTTPRules
- type IntRange
- type IstioControlPlaneRef
- type IstioEgressListener
- type IstioIngressListener
- type IstioNamespace
- type MTLSModeInput
- type MeshService
- type MeshWorkload
- type MeshWorkloadSidecar
- type MutualTLSInput
- type NamespaceResponse
- type NamespacesResponse
- type OverviewResponse
- type PeerAuthenticationMethodInput
- type Pod
- type Policy
- type PolicySelectorInput
- type Request
- type Sidecar
- type SidecarEgressSelector
- type SidecarSpec
- type StringMatchType
- type TargetSelectorInput
- type WSClient
- type WorkloadSelector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyGlobalTrafficPolicyRequest ¶
type ApplyGlobalTrafficPolicyRequest struct { Name string `json:"name"` Namespace string `json:"namespace"` ConnectionPool *v1alpha3.ConnectionPoolSettings `json:"connectionPoolSettings,omitempty"` OutlierDetection *v1alpha3.OutlierDetection `json:"outlierDetection,omitempty"` }
type ApplyGlobalTrafficPolicyResponse ¶
type ApplyGlobalTrafficPolicyResponse bool
type ApplyHTTPRouteRequest ¶
type ApplyHTTPRouteRequest struct { Selector HTTPRouteSelector `json:"selector"` Rule HTTPRules `json:"rule"` }
type ApplyHTTPRouteResponse ¶
type ApplyHTTPRouteResponse bool
type ApplyMeshPolicyInput ¶
type ApplyMeshPolicyInput struct { ControlPlane string `json:"controlPlane,omitempty"` MTLSMode *MTLSModeInput `json:"mtlsMode"` }
type ApplyPolicyPeersInput ¶
type ApplyPolicyPeersInput struct { Selector *PolicySelectorInput `json:"selector"` Peers []*PeerAuthenticationMethodInput `json:"peers"` }
type ApplySidecarEgressInput ¶
type ApplySidecarEgressInput struct { Selector SidecarEgressSelector `json:"selector"` Egress Egress `json:"egress"` }
type ApplySidecarEgressResponse ¶
type ApplySidecarEgressResponse bool
type AuthPortSelectorInput ¶
type AuthTLSModeInput ¶
type AuthTLSModeInput string
const ( AuthTLSModeInputStrict AuthTLSModeInput = "STRICT" AuthTLSModeInputPermissive AuthTLSModeInput = "PERMISSIVE" )
func AuthTLSModeInputToPointer ¶
func AuthTLSModeInputToPointer(mode AuthTLSModeInput) *AuthTLSModeInput
type Client ¶
type Client interface { WSClient() *WSClient NewSubscribeRequest(q string) *Request SetJWTToken(string) GetNamespaces() (NamespacesResponse, error) GetPod(namespace, name string) (*Pod, error) GetNamespace(name string) (NamespaceResponse, error) GetNamespaceWithSidecar(name string) (NamespaceResponse, error) GetNamespaceWithSidecarRecommendation(name string, isolationLevel string) (NamespaceResponse, error) GetNamespaceWithMTLS(revision, namespace string) (NamespaceResponse, error) EnableAutoSidecarInjection(req EnableAutoSidecarInjectionRequest) (EnableAutoSidecarInjectionResponse, error) DisableAutoSidecarInjection(req DisableAutoSidecarInjectionRequest) (DisableAutoSidecarInjectionResponse, error) GenerateLoad(req GenerateLoadRequest) (GenerateLoadResponse, error) ApplyHTTPRoute(req ApplyHTTPRouteRequest) (ApplyHTTPRouteResponse, error) DisableHTTPRoute(req DisableHTTPRouteRequest) (DisableHTTPRouteResponse, error) ApplyGlobalTrafficPolicy(req ApplyGlobalTrafficPolicyRequest) (ApplyGlobalTrafficPolicyResponse, error) DisableGlobalTrafficPolicy(req DisableGlobalTrafficPolicyRequest) (DisableGlobalTrafficPolicyResponse, error) GetService(namespace, name string) (*MeshService, error) GetWorkload(namespace, name string) (*MeshWorkload, error) GetWorkloadWithSidecar(namespace, name string) (*MeshWorkloadSidecar, error) GetWorkloadWithSidecarRecommendation(namespace, name string, isolationLevel string, labelWhitelist []string) (*MeshWorkloadSidecar, error) GetServiceWithMTLS(controlPlaneID, namespace, name string) (*MeshService, error) Overview(evaluationDurationSeconds uint) (OverviewResponse, error) Clusters() (ClustersResponse, error) AttachPeerCluster(req AttachPeerClusterRequest) (bool, error) DetachPeerCluster(name string) (bool, error) ApplySidecarEgress(input ApplySidecarEgressInput) (ApplySidecarEgressResponse, error) DisableSidecarEgress(input DisableSidecarEgressInput) (DisableSidecarEgressResponse, error) ApplyPolicyPeers(input ApplyPolicyPeersInput) (bool, error) DisablePolicyPeers(input DisablePolicyPeersInput) (bool, error) ApplyMeshPolicy(input ApplyMeshPolicyInput) (bool, error) SubscribeToAccessLogs(ctx context.Context, req *GetAccessLogsInput, resp chan interface{}, err chan error) Close() }
type ClientOption ¶
type ClientOption func(*WSClient)
func WithHTTPClient ¶
func WithHTTPClient(httpclient *http.Client) ClientOption
type Cluster ¶
type Cluster struct { ID string `json:"id"` Name string `json:"name"` Namespace string `json:"namespace"` Type string `json:"type"` Status ClusterStatus `json:"status"` IstioControlPlane IstioControlPlaneRef `json:"istioControlPlane"` }
type ClusterStatus ¶
type ClustersResponse ¶
type ClustersResponse []Cluster
func (ClustersResponse) GetClusterByName ¶
func (cr ClustersResponse) GetClusterByName(name string) (bool, *Cluster)
func (ClustersResponse) GetHostCluster ¶
func (cr ClustersResponse) GetHostCluster() (bool, *Cluster)
type DisableAutoSidecarInjectionRequest ¶
type DisableAutoSidecarInjectionRequest struct {
Name string `json:"name"`
}
type DisableGlobalTrafficPolicyResponse ¶
type DisableGlobalTrafficPolicyResponse bool
type DisableHTTPRouteRequest ¶
type DisableHTTPRouteRequest struct { Selector HTTPRouteSelector `json:"selector"` Rules []string `json:"rules"` }
type DisableHTTPRouteResponse ¶
type DisableHTTPRouteResponse bool
type DisablePolicyPeersInput ¶
type DisablePolicyPeersInput struct {
Selector *PolicySelectorInput `json:"selector"`
}
type DisableSidecarEgressInput ¶
type DisableSidecarEgressInput struct {
Selector SidecarEgressSelector `json:"selector"`
}
type DisableSidecarEgressResponse ¶
type DisableSidecarEgressResponse bool
type EnableAutoSidecarInjectionRequest ¶
type EnableAutoSidecarInjectionRequest struct {
Name string `json:"name"`
}
type GenerateLoadRequest ¶
type GenerateLoadResponse ¶
type GetAccessLogsInput ¶
type GetAccessLogsInput struct { SourceType string `json:"sourceType,omitempty"` SourceName string `json:"sourceName,omitempty"` SourceNamespace string `json:"sourceNamespace,omitempty"` DestinationType string `json:"destinationType,omitempty"` DestinationName string `json:"destinationName,omitempty"` DestinationNamespace string `json:"destinationNamespace,omitempty"` ReporterType string `json:"reporterType,omitempty"` ReporterName string `json:"reporterName,omitempty"` ReporterNamespace string `json:"reporterNamespace,omitempty"` Direction string `json:"direction,omitempty"` Authority string `json:"authority,omitempty"` Scheme string `json:"scheme,omitempty"` Method string `json:"method,omitempty"` Path string `json:"path,omitempty"` StatusCode IntRange `json:"statusCode,omitempty"` RequestHeaderMatch []HTTPHeaderMatch `json:"requestHeaderMatch,omitempty"` ResponseHeaderMatch []HTTPHeaderMatch `json:"responseHeaderMatch,omitempty"` MaxRPS uint `json:"maxRPS,omitempty"` }
type HTTPHeaderMatch ¶
type HTTPHeaderMatch struct { Name string `json:"name"` Value string `json:"value,omitempty"` Type StringMatchType `json:"type"` }
type HTTPRouteSelector ¶
type HTTPRouteSelector struct { Name string `json:"name"` Namespace string `json:"namespace"` Matches []*v1alpha3.HTTPMatchRequest `json:"match,omitempty"` }
type HTTPRules ¶
type HTTPRules struct { Matches []*v1alpha3.HTTPMatchRequest `json:"match,omitempty"` Route []*v1alpha3.HTTPRouteDestination `json:"route,omitempty"` Redirect *v1alpha3.HTTPRedirect `json:"redirect,omitempty"` FaultInjection *v1alpha3.HTTPFaultInjection `json:"fault,omitempty"` Timeout *string `json:"timeout,omitempty"` Retries *v1alpha3.HTTPRetry `json:"retries,omitempty"` Rewrite *v1alpha3.HTTPRewrite `json:"rewrite,omitempty"` Mirror *v1alpha3.Destination `json:"mirror,omitempty"` }
type IstioControlPlaneRef ¶
type IstioEgressListener ¶
type IstioIngressListener ¶
type IstioNamespace ¶
type MTLSModeInput ¶
type MTLSModeInput string
const ( MTLSModeInputStrict MTLSModeInput = "STRICT" MTLSModeInputPermissive MTLSModeInput = "PERMISSIVE" MTLSModeInputDISABLED MTLSModeInput = "DISABLED" )
type MeshService ¶
type MeshService struct { ID string `json:"id"` Name string `json:"name"` Namespace string `json:"namespace,omitempty"` VirtualServices []v1alpha3.VirtualService `json:"virtualServices"` DestinationRules []v1alpha3.DestinationRule `json:"destinationRules"` Policies []Policy `json:"policies"` }
type MeshWorkload ¶
type MeshWorkloadSidecar ¶
type MeshWorkloadSidecar struct { MeshWorkload `json:",inline"` Sidecars []Sidecar `json:"sidecars,omitempty"` RecommendedSidecars []Sidecar `json:"recommendedSidecars,omitempty"` }
type MutualTLSInput ¶
type MutualTLSInput struct {
Mode *AuthTLSModeInput `json:"mode"`
}
type NamespaceResponse ¶
type NamespaceResponse struct {
Namespace IstioNamespace `json:"namespace"`
}
type NamespacesResponse ¶
type NamespacesResponse struct {
Namespaces []IstioNamespace `json:"namespaces"`
}
type OverviewResponse ¶
type OverviewResponse struct { Start time.Time `json:"start"` End time.Time `json:"end"` Clusters int `json:"clusters"` Services int `json:"services"` ServicesInMesh int `json:"servicesInMesh"` Workloads int `json:"workloads"` WorkloadsInMesh int `json:"workloadsInMesh"` Pods int `json:"pods"` PodsInMesh int `json:"podsInMesh"` ErrorRate float32 `json:"errorRate"` Latency float32 `json:"latency"` RPS float32 `json:"rps"` }
type PeerAuthenticationMethodInput ¶
type PeerAuthenticationMethodInput struct {
Mtls *MutualTLSInput `json:"mtls"`
}
type PolicySelectorInput ¶
type PolicySelectorInput struct { Namespace string `json:"namespace"` Target *TargetSelectorInput `json:"target"` }
type Sidecar ¶
type Sidecar struct { Spec SidecarSpec `json:"spec"` Name string `json:"name"` Namespace string `json:"namespace"` }
the only reason for not using the types from the Istio client go package here is that Istio uses snake case in YAML...
type SidecarEgressSelector ¶
type SidecarSpec ¶
type SidecarSpec struct { WorkloadSelector *WorkloadSelector `json:"workloadSelector,omitempty"` Ingress []*IstioIngressListener `json:"ingress,omitempty"` Egress []*IstioEgressListener `json:"egress"` OutboundTrafficPolicy *v1alpha3.OutboundTrafficPolicy `json:"outboundTrafficPolicy,omitempty"` }
type StringMatchType ¶
type StringMatchType string
const ( StringMatchTypePrefix StringMatchType = "PREFIX" StringMatchTypeSuffix StringMatchType = "SUFFIX" StringMatchTypeExact StringMatchType = "EXACT" StringMatchTypeRegex StringMatchType = "REGEX" StringMatchTypeExists StringMatchType = "EXISTS" )
type TargetSelectorInput ¶
type TargetSelectorInput struct { Name string `json:"name"` Port *AuthPortSelectorInput `json:"port"` }
type WSClient ¶
type WSClient struct {
// contains filtered or unexported fields
}
func NewWSClient ¶
func NewWSClient(endpoint string, opts ...ClientOption) *WSClient
type WorkloadSelector ¶
Source Files ¶
- accesslogs.go
- apply_global_traffic_policy.go
- apply_http_route.go
- apply_mesh_policy.go
- apply_policy_peers.go
- apply_sidecar_egress.go
- attach_peer_cluster.go
- client.go
- clusters.go
- detach_peer_cluster.go
- disableAutoSidecarInjection.go
- disable_global_traffic_policy.go
- disable_http_route.go
- disable_policy_peers.go
- disable_sidecar_egress.go
- enableAutoSidecarInjection.go
- generate_load.go
- get_pod.go
- get_service.go
- get_workload.go
- namespaces.go
- overview.go
- request.go
- ws.go
Click to show internal directories.
Click to hide internal directories.