Documentation ¶
Index ¶
- func CheckDestinationPolicyCircuitBreaker(destinationPolicy IstioObject, namespace string, serviceName string, ...) bool
- func CheckDestinationRuleCircuitBreaker(destinationRule IstioObject, namespace string, serviceName string, ...) bool
- func CheckDestinationRulemTLS(destinationRule IstioObject, namespace string, serviceName string) bool
- func CheckHostnameService(hostname, service, namespace string) bool
- func CheckRouteRule(routeRule IstioObject, namespace string, serviceName string, version string) bool
- func CheckVirtualService(virtualService IstioObject, namespace string, serviceName string, ...) bool
- func ConfigClient() (*rest.Config, error)
- func FilterByDestination(spec map[string]interface{}, namespace string, serviceName string, ...) bool
- func FilterByHost(spec map[string]interface{}, serviceName string, namespace string) bool
- func FilterDeploymentsForService(s *v1.Service, servicePods []v1.Pod, allDepls *v1beta1.DeploymentList) []v1beta1.Deployment
- func FilterPodsForService(s *v1.Service, allPods *v1.PodList) []v1.Pod
- func GetDestinationRulesSubsets(destinationRules []IstioObject, serviceName, version string) []string
- type DestinationPolicy
- func (in *DestinationPolicy) DeepCopy() *DestinationPolicy
- func (in *DestinationPolicy) DeepCopyInto(out *DestinationPolicy)
- func (in *DestinationPolicy) DeepCopyIstioObject() IstioObject
- func (in *DestinationPolicy) DeepCopyObject() runtime.Object
- func (in *DestinationPolicy) GetObjectMeta() meta_v1.ObjectMeta
- func (in *DestinationPolicy) GetSpec() map[string]interface{}
- func (in *DestinationPolicy) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *DestinationPolicy) SetSpec(spec map[string]interface{})
- type DestinationPolicyList
- type DestinationRule
- func (in *DestinationRule) DeepCopy() *DestinationRule
- func (in *DestinationRule) DeepCopyInto(out *DestinationRule)
- func (in *DestinationRule) DeepCopyIstioObject() IstioObject
- func (in *DestinationRule) DeepCopyObject() runtime.Object
- func (in *DestinationRule) GetObjectMeta() meta_v1.ObjectMeta
- func (in *DestinationRule) GetSpec() map[string]interface{}
- func (in *DestinationRule) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *DestinationRule) SetSpec(spec map[string]interface{})
- type DestinationRuleList
- type Gateway
- func (in *Gateway) DeepCopy() *Gateway
- func (in *Gateway) DeepCopyInto(out *Gateway)
- func (in *Gateway) DeepCopyIstioObject() IstioObject
- func (in *Gateway) DeepCopyObject() runtime.Object
- func (in *Gateway) GetObjectMeta() meta_v1.ObjectMeta
- func (in *Gateway) GetSpec() map[string]interface{}
- func (in *Gateway) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *Gateway) SetSpec(spec map[string]interface{})
- type GatewayList
- type IstioClient
- func (in *IstioClient) GetDeployments(namespace string) (*v1beta1.DeploymentList, error)
- func (in *IstioClient) GetDestinationPolicies(namespace string, serviceName string) ([]IstioObject, error)
- func (in *IstioClient) GetDestinationPolicy(namespace string, destinationpolicy string) (IstioObject, error)
- func (in *IstioClient) GetDestinationRule(namespace string, destinationrule string) (IstioObject, error)
- func (in *IstioClient) GetDestinationRules(namespace string, serviceName string) ([]IstioObject, error)
- func (in *IstioClient) GetGateway(namespace string, gateway string) (IstioObject, error)
- func (in *IstioClient) GetGateways(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetIstioDetails(namespace string, serviceName string) (*IstioDetails, error)
- func (in *IstioClient) GetIstioRuleDetails(namespace string, istiorule string) (*IstioRuleDetails, error)
- func (in *IstioClient) GetIstioRules(namespace string) (*IstioRules, error)
- func (in *IstioClient) GetNamespacePods(namespace string) (*v1.PodList, error)
- func (in *IstioClient) GetNamespaces() (*v1.NamespaceList, error)
- func (in *IstioClient) GetPods(namespace, labelSelector string) (*v1.PodList, error)
- func (in *IstioClient) GetRouteRule(namespace string, routerule string) (IstioObject, error)
- func (in *IstioClient) GetRouteRules(namespace string, serviceName string) ([]IstioObject, error)
- func (in *IstioClient) GetService(namespace, serviceName string) (*v1.Service, error)
- func (in *IstioClient) GetServiceDetails(namespace string, serviceName string) (*ServiceDetails, error)
- func (in *IstioClient) GetServicePods(namespace, serviceName, serviceVersion string) (*v1.PodList, error)
- func (in *IstioClient) GetServices(namespace string) (*ServiceList, error)
- func (in *IstioClient) GetVirtualService(namespace string, virtualservice string) (IstioObject, error)
- func (in *IstioClient) GetVirtualServices(namespace string, serviceName string) ([]IstioObject, error)
- type IstioClientInterface
- type IstioDetails
- type IstioObject
- type IstioObjectList
- type IstioRuleAction
- type IstioRuleDetails
- type IstioRules
- type MockIstioObject
- func (in *MockIstioObject) DeepCopy() *MockIstioObject
- func (in *MockIstioObject) DeepCopyInto(out *MockIstioObject)
- func (in *MockIstioObject) DeepCopyIstioObject() IstioObject
- func (in *MockIstioObject) DeepCopyObject() runtime.Object
- func (in *MockIstioObject) GetObjectMeta() meta_v1.ObjectMeta
- func (in *MockIstioObject) GetSpec() map[string]interface{}
- func (in *MockIstioObject) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *MockIstioObject) SetSpec(spec map[string]interface{})
- type MockIstioObjectList
- type OSRouteClient
- type RouteRule
- func (in *RouteRule) DeepCopy() *RouteRule
- func (in *RouteRule) DeepCopyInto(out *RouteRule)
- func (in *RouteRule) DeepCopyIstioObject() IstioObject
- func (in *RouteRule) DeepCopyObject() runtime.Object
- func (in *RouteRule) GetObjectMeta() meta_v1.ObjectMeta
- func (in *RouteRule) GetSpec() map[string]interface{}
- func (in *RouteRule) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *RouteRule) SetSpec(spec map[string]interface{})
- type RouteRuleList
- type ServiceDetails
- type ServiceList
- type VirtualService
- func (in *VirtualService) DeepCopy() *VirtualService
- func (in *VirtualService) DeepCopyInto(out *VirtualService)
- func (in *VirtualService) DeepCopyIstioObject() IstioObject
- func (in *VirtualService) DeepCopyObject() runtime.Object
- func (in *VirtualService) GetObjectMeta() meta_v1.ObjectMeta
- func (in *VirtualService) GetSpec() map[string]interface{}
- func (in *VirtualService) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *VirtualService) SetSpec(spec map[string]interface{})
- type VirtualServiceList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDestinationPolicyCircuitBreaker ¶
func CheckDestinationPolicyCircuitBreaker(destinationPolicy IstioObject, namespace string, serviceName string, version string) bool
CheckDestinationPolicyCircuitBreaker returns true if the destinationPolicy object includes a circuitBreaker defined on a destination defined by namespace, serviceName and version parameters. It returns false otherwise.
func CheckDestinationRuleCircuitBreaker ¶
func CheckDestinationRuleCircuitBreaker(destinationRule IstioObject, namespace string, serviceName string, version string) bool
CheckDestinationRuleCircuitBreaker returns true if the destinationRule object includes a trafficPolicy configuration on connectionPool or outlierDetection. TrafficPolicy configuration can be defined at service level or per subset defined by a version. It returns false otherwise.
func CheckDestinationRulemTLS ¶
func CheckDestinationRulemTLS(destinationRule IstioObject, namespace string, serviceName string) bool
func CheckHostnameService ¶
CheckHostnameService returns true when the hostname specifies the service passed by param. It accepts the following hostname formats: *, reviews, reviews.bookinfo.svc, reviews.bookinfo.svc.cluster.local, *.bookinfo.svc, *.bookinfo.svc.cluster.local
func CheckRouteRule ¶
func CheckRouteRule(routeRule IstioObject, namespace string, serviceName string, version string) bool
CheckRouteRule returns true if the routeRule object includes a destination defined by namespace, serviceName and version parameters. It returns false otherwise.
func CheckVirtualService ¶
func CheckVirtualService(virtualService IstioObject, namespace string, serviceName string, subsets []string) bool
CheckVirtualService returns true if virtualService object has defined a route on a service for any subset passed as parameter. It returns false otherwise.
func ConfigClient ¶
ConfigClient return a client with the correct configuration Returns configuration if Kiali is in Cluster when InCluster is true Returns configuration if Kiali is not int Cluster when InCluster is false It returns an error on any problem
func FilterByDestination ¶
func FilterByHost ¶
func FilterDeploymentsForService ¶
func FilterDeploymentsForService(s *v1.Service, servicePods []v1.Pod, allDepls *v1beta1.DeploymentList) []v1beta1.Deployment
FilterDeploymentsForService returns a subpart of deployments list filtered according to pods labels.
func FilterPodsForService ¶
FilterPodsForService returns a subpart of pod list filtered according service selector
func GetDestinationRulesSubsets ¶
func GetDestinationRulesSubsets(destinationRules []IstioObject, serviceName, version string) []string
GetDestinationRulesSubsets returns an array of subset names where a specific version is defined for a given service
Types ¶
type DestinationPolicy ¶
type DestinationPolicy struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
DestinationPolicy is the generic Kubernetes API object wrapper DestinationPolicy starts with uppercase as it maps a "kind":"DestinationPolicy" Istio response.
func (*DestinationPolicy) DeepCopy ¶
func (in *DestinationPolicy) DeepCopy() *DestinationPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationPolicy.
func (*DestinationPolicy) DeepCopyInto ¶
func (in *DestinationPolicy) DeepCopyInto(out *DestinationPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DestinationPolicy) DeepCopyIstioObject ¶
func (in *DestinationPolicy) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*DestinationPolicy) DeepCopyObject ¶
func (in *DestinationPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DestinationPolicy) GetObjectMeta ¶
func (in *DestinationPolicy) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*DestinationPolicy) GetSpec ¶
func (in *DestinationPolicy) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*DestinationPolicy) SetObjectMeta ¶
func (in *DestinationPolicy) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*DestinationPolicy) SetSpec ¶
func (in *DestinationPolicy) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type DestinationPolicyList ¶
type DestinationPolicyList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []DestinationPolicy `json:"items"` }
DestinationPolicyList is the generic Kubernetes API list wrapper DestinationPolicyList starts with uppercase as it maps a "kind":"DestinationPolicyList" Istio response.
func (*DestinationPolicyList) DeepCopy ¶
func (in *DestinationPolicyList) DeepCopy() *DestinationPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationPolicyList.
func (*DestinationPolicyList) DeepCopyInto ¶
func (in *DestinationPolicyList) DeepCopyInto(out *DestinationPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DestinationPolicyList) DeepCopyObject ¶
func (in *DestinationPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DestinationPolicyList) GetItems ¶
func (in *DestinationPolicyList) GetItems() []IstioObject
GetItems from a wrapper
type DestinationRule ¶
type DestinationRule struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
DestinationRule is the generic Kubernetes API object wrapper DestinationRule starts with uppercase as it maps a "kind":"DestinationRule" Istio response.
func (*DestinationRule) DeepCopy ¶
func (in *DestinationRule) DeepCopy() *DestinationRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRule.
func (*DestinationRule) DeepCopyInto ¶
func (in *DestinationRule) DeepCopyInto(out *DestinationRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DestinationRule) DeepCopyIstioObject ¶
func (in *DestinationRule) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*DestinationRule) DeepCopyObject ¶
func (in *DestinationRule) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DestinationRule) GetObjectMeta ¶
func (in *DestinationRule) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*DestinationRule) GetSpec ¶
func (in *DestinationRule) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*DestinationRule) SetObjectMeta ¶
func (in *DestinationRule) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*DestinationRule) SetSpec ¶
func (in *DestinationRule) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type DestinationRuleList ¶
type DestinationRuleList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []DestinationRule `json:"items"` }
DestinationRuleList is the generic Kubernetes API list wrapper DestinationRuleList starts with uppercase as it maps a "kind":"DestinationRuleList" Istio response.
func (*DestinationRuleList) DeepCopy ¶
func (in *DestinationRuleList) DeepCopy() *DestinationRuleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRuleList.
func (*DestinationRuleList) DeepCopyInto ¶
func (in *DestinationRuleList) DeepCopyInto(out *DestinationRuleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DestinationRuleList) DeepCopyObject ¶
func (in *DestinationRuleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DestinationRuleList) GetItems ¶
func (in *DestinationRuleList) GetItems() []IstioObject
GetItems from a wrapper
type Gateway ¶
type Gateway struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
Gateway is the generic Kubernetes API object wrapper Gateway starts with uppercase as it maps a "kind":"Gateway" Istio response.
func (*Gateway) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualService.
func (*Gateway) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Gateway) DeepCopyIstioObject ¶
func (in *Gateway) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*Gateway) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Gateway) GetObjectMeta ¶
func (in *Gateway) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*Gateway) SetObjectMeta ¶
func (in *Gateway) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
type GatewayList ¶
type GatewayList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []Gateway `json:"items"` }
GatewayList is the generic Kubernetes API list wrapper GatewayList starts with uppercase as it maps a "kind":"GatewayList" Istio response.
func (*GatewayList) DeepCopy ¶
func (in *GatewayList) DeepCopy() *GatewayList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceList.
func (*GatewayList) DeepCopyInto ¶
func (in *GatewayList) DeepCopyInto(out *GatewayList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GatewayList) DeepCopyObject ¶
func (in *GatewayList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GatewayList) GetItems ¶
func (in *GatewayList) GetItems() []IstioObject
GetItems from a wrapper
type IstioClient ¶
type IstioClient struct { IstioClientInterface // contains filtered or unexported fields }
IstioClient is the client struct for Kubernetes and Istio APIs It hides the way it queries each API
func NewClient ¶
func NewClient() (*IstioClient, error)
NewClient creates a new client to the Kubernetes and Istio APIs. It takes the assumption that Istio is deployed into the cluster. It hides the access to Kubernetes/Openshift credentials. It hides the low level use of the API of Kubernetes and Istio, it should be considered as an implementation detail. It returns an error on any problem.
func (*IstioClient) GetDeployments ¶
func (in *IstioClient) GetDeployments(namespace string) (*v1beta1.DeploymentList, error)
GetDeployments returns a list of deployments for a given namespace. It returns an error on any problem.
func (*IstioClient) GetDestinationPolicies ¶
func (in *IstioClient) GetDestinationPolicies(namespace string, serviceName string) ([]IstioObject, error)
GetDestinationPolicies returns all DestinationPolicies for a given namespace. If serviceName param is provided it will filter all DestinationPolicies having a destination pointing to a particular service. It returns an error on any problem.
func (*IstioClient) GetDestinationPolicy ¶
func (in *IstioClient) GetDestinationPolicy(namespace string, destinationpolicy string) (IstioObject, error)
func (*IstioClient) GetDestinationRule ¶
func (in *IstioClient) GetDestinationRule(namespace string, destinationrule string) (IstioObject, error)
func (*IstioClient) GetDestinationRules ¶
func (in *IstioClient) GetDestinationRules(namespace string, serviceName string) ([]IstioObject, error)
GetDestinationRules returns all DestinationRules for a given namespace. If serviceName param is provided it will filter all DestinationRules having a host defined on a particular service. It returns an error on any problem.
func (*IstioClient) GetGateway ¶
func (in *IstioClient) GetGateway(namespace string, gateway string) (IstioObject, error)
func (*IstioClient) GetGateways ¶
func (in *IstioClient) GetGateways(namespace string) ([]IstioObject, error)
GetGateways return all Gateways for a given namespace. It returns an error on any problem.
func (*IstioClient) GetIstioDetails ¶
func (in *IstioClient) GetIstioDetails(namespace string, serviceName string) (*IstioDetails, error)
GetIstioDetails returns Istio details for a given namespace, on this version it collects the RouterRules, DestinationPolicies, VirtualService and DestinationRules defined for a namespace. If serviceName param is provided, it filters all the Istio objects pointing to a particular service. It returns an error on any problem.
func (*IstioClient) GetIstioRuleDetails ¶
func (in *IstioClient) GetIstioRuleDetails(namespace string, istiorule string) (*IstioRuleDetails, error)
GetIstioRuleDetails returns the handlers and instances details for a given mixer rule. On this version, the following handlers and instances are supported:
- listchecker
- listentry
- denier
- checknothing
func (*IstioClient) GetIstioRules ¶
func (in *IstioClient) GetIstioRules(namespace string) (*IstioRules, error)
GetIstioRules returns a list of mixer rules for a given namespace.
func (*IstioClient) GetNamespacePods ¶
func (in *IstioClient) GetNamespacePods(namespace string) (*v1.PodList, error)
GetNamespacePods returns the pods definitions for a given namespace It returns an error on any problem.
func (*IstioClient) GetNamespaces ¶
func (in *IstioClient) GetNamespaces() (*v1.NamespaceList, error)
GetNamespaces returns a list of all namespaces of the cluster. It returns a list of all namespaces of the cluster. It returns an error on any problem.
func (*IstioClient) GetPods ¶
func (in *IstioClient) GetPods(namespace, labelSelector string) (*v1.PodList, error)
GetPods returns the pods definitions for a given set of labels. It returns an error on any problem.
func (*IstioClient) GetRouteRule ¶
func (in *IstioClient) GetRouteRule(namespace string, routerule string) (IstioObject, error)
func (*IstioClient) GetRouteRules ¶
func (in *IstioClient) GetRouteRules(namespace string, serviceName string) ([]IstioObject, error)
GetRouteRules returns all RouteRules for a given namespace. If serviceName param is provided it will filter all RouteRules having a destination pointing to particular service. It returns an error on any problem.
func (*IstioClient) GetService ¶
func (in *IstioClient) GetService(namespace, serviceName string) (*v1.Service, error)
GetService returns the definition of a specific service. It returns an error on any problem.
func (*IstioClient) GetServiceDetails ¶
func (in *IstioClient) GetServiceDetails(namespace string, serviceName string) (*ServiceDetails, error)
GetServiceDetails returns full details for a given service, consisting on service description, endpoints and pods. A service is defined by the namespace and the service name. It returns an error on any problem.
func (*IstioClient) GetServicePods ¶
func (in *IstioClient) GetServicePods(namespace, serviceName, serviceVersion string) (*v1.PodList, error)
GetServicePods returns the list of pods associated to a given service. namespace is required. A selector is generated using the canonical labels for serviceName (required) and serviceVersion (optional). An error is returned on any problem.
func (*IstioClient) GetServices ¶
func (in *IstioClient) GetServices(namespace string) (*ServiceList, error)
GetServices returns a list of services for a given namespace. It returns an error on any problem.
func (*IstioClient) GetVirtualService ¶
func (in *IstioClient) GetVirtualService(namespace string, virtualservice string) (IstioObject, error)
func (*IstioClient) GetVirtualServices ¶
func (in *IstioClient) GetVirtualServices(namespace string, serviceName string) ([]IstioObject, error)
GetVirtualServices return all VirtualServices for a given namespace. If serviceName param is provided it will filter all VirtualServices having a host defined on a particular service. It returns an error on any problem.
type IstioClientInterface ¶
type IstioClientInterface interface { GetNamespaces() (*v1.NamespaceList, error) GetService(namespace string, serviceName string) (*v1.Service, error) GetServices(namespaceName string) (*ServiceList, error) GetServiceDetails(namespace string, serviceName string) (*ServiceDetails, error) GetPods(namespace, labelSelector string) (*v1.PodList, error) GetNamespacePods(namespace string) (*v1.PodList, error) GetServicePods(namespace string, serviceName string, serviceVersion string) (*v1.PodList, error) GetIstioDetails(namespace string, serviceName string) (*IstioDetails, error) GetGateways(namespace string) ([]IstioObject, error) GetGateway(namespace string, gateway string) (IstioObject, error) GetRouteRules(namespace string, serviceName string) ([]IstioObject, error) GetRouteRule(namespace string, routerule string) (IstioObject, error) GetDestinationPolicies(namespace string, serviceName string) ([]IstioObject, error) GetDestinationPolicy(namespace string, destinationpolicy string) (IstioObject, error) GetVirtualServices(namespace string, serviceName string) ([]IstioObject, error) GetVirtualService(namespace string, virtualservice string) (IstioObject, error) GetDestinationRules(namespace string, serviceName string) ([]IstioObject, error) GetDestinationRule(namespace string, destinationrule string) (IstioObject, error) GetIstioRules(namespace string) (*IstioRules, error) GetIstioRuleDetails(namespace string, istiorule string) (*IstioRuleDetails, error) }
IstioClientInterface for mocks (only mocked function are necessary here)
type IstioDetails ¶
type IstioDetails struct { RouteRules []IstioObject `json:"routerules"` DestinationPolicies []IstioObject `json:"destinationpolicies"` VirtualServices []IstioObject `json:"virtualservices"` DestinationRules []IstioObject `json:"destinationrules"` }
IstioDetails is a wrapper to group all Istio objects related to a Service. Used to fetch all Istio information in a single operation instead to invoke individual APIs per each group.
type IstioObject ¶
type IstioObject interface { runtime.Object GetSpec() map[string]interface{} SetSpec(map[string]interface{}) GetObjectMeta() meta_v1.ObjectMeta SetObjectMeta(meta_v1.ObjectMeta) DeepCopyIstioObject() IstioObject }
IstioObject is a k8s wrapper interface for config objects. Taken from istio.io
type IstioObjectList ¶
type IstioObjectList interface { runtime.Object GetItems() []IstioObject }
IstioObjectList is a k8s wrapper interface for list config objects. Taken from istio.io
type IstioRuleAction ¶
type IstioRuleAction struct { Handler IstioObject `json:"handler"` Instances []IstioObject `json:"instances"` }
IstioRuleAction is a wrapper to group a handler object and a list of instances per a specific action.
type IstioRuleDetails ¶
type IstioRuleDetails struct { Rule IstioObject `json:"rule"` Actions []*IstioRuleAction `json:"actions"` }
IstioRuleDetails is a wrapper to group a mixer rule with its actions.
type IstioRules ¶
type IstioRules struct {
Rules []IstioObject `json:"rules"`
}
IstioRules is a wrapper to group all mixer rules related to a Namespace. Rules can have match expressions that may dynamically affect to several services.
type MockIstioObject ¶
type MockIstioObject struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
func (*MockIstioObject) DeepCopy ¶
func (in *MockIstioObject) DeepCopy() *MockIstioObject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteRule.
func (*MockIstioObject) DeepCopyInto ¶
func (in *MockIstioObject) DeepCopyInto(out *MockIstioObject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MockIstioObject) DeepCopyIstioObject ¶
func (in *MockIstioObject) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*MockIstioObject) DeepCopyObject ¶
func (in *MockIstioObject) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MockIstioObject) GetObjectMeta ¶
func (in *MockIstioObject) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*MockIstioObject) GetSpec ¶
func (in *MockIstioObject) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*MockIstioObject) SetObjectMeta ¶
func (in *MockIstioObject) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*MockIstioObject) SetSpec ¶
func (in *MockIstioObject) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type MockIstioObjectList ¶
type MockIstioObjectList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []RouteRule `json:"items"` }
RouteRuleList is the generic Kubernetes API list wrapper
func (*MockIstioObjectList) DeepCopy ¶
func (in *MockIstioObjectList) DeepCopy() *MockIstioObjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteRuleList.
func (*MockIstioObjectList) DeepCopyInto ¶
func (in *MockIstioObjectList) DeepCopyInto(out *MockIstioObjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MockIstioObjectList) DeepCopyObject ¶
func (in *MockIstioObjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MockIstioObjectList) GetItems ¶
func (in *MockIstioObjectList) GetItems() []IstioObject
GetItems from a wrapper
type OSRouteClient ¶
type OSRouteClient struct {
// contains filtered or unexported fields
}
OSRouteClient is the client struct for OpenShift Routes API over Kubernetes It hides the way it queries each API
func NewOSRouteClient ¶
func NewOSRouteClient() (*OSRouteClient, error)
NewOSRouteClient creates a new client able to fetch OpenShift Routes API.
type RouteRule ¶
type RouteRule struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
RouteRule is the generic Kubernetes API object wrapper RouteRule starts with uppercase as it maps a "kind":"RouteRule" Istio response.
func (*RouteRule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteRule.
func (*RouteRule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RouteRule) DeepCopyIstioObject ¶
func (in *RouteRule) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*RouteRule) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*RouteRule) GetObjectMeta ¶
func (in *RouteRule) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*RouteRule) SetObjectMeta ¶
func (in *RouteRule) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
type RouteRuleList ¶
type RouteRuleList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []RouteRule `json:"items"` }
RouteRuleList is the generic Kubernetes API list wrapper RouteRuleList starts with uppercase as it maps a "kind":"RouteRuleList" Istio response.
func (*RouteRuleList) DeepCopy ¶
func (in *RouteRuleList) DeepCopy() *RouteRuleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteRuleList.
func (*RouteRuleList) DeepCopyInto ¶
func (in *RouteRuleList) DeepCopyInto(out *RouteRuleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RouteRuleList) DeepCopyObject ¶
func (in *RouteRuleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*RouteRuleList) GetItems ¶
func (in *RouteRuleList) GetItems() []IstioObject
GetItems from a wrapper
type ServiceDetails ¶
type ServiceDetails struct { Service *v1.Service `json:"service"` Endpoints *v1.Endpoints `json:"endpoints"` Deployments *v1beta1.DeploymentList `json:"deployments"` Autoscalers *autoscalingV1.HorizontalPodAutoscalerList `json:"autoscalers"` Pods []v1.Pod `json:"pods"` }
ServiceDetails is a wrapper to group full Service description, Endpoints and Pods. Used to fetch all details in a single operation instead to invoke individual APIs per each group.
type ServiceList ¶
type ServiceList struct { Services *v1.ServiceList Pods *v1.PodList Deployments *v1beta1.DeploymentList }
type VirtualService ¶
type VirtualService struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
VirtualService is the generic Kubernetes API object wrapper VirtualService starts with uppercase as it maps a "kind":"VirtualService" Istio response.
func (*VirtualService) DeepCopy ¶
func (in *VirtualService) DeepCopy() *VirtualService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualService.
func (*VirtualService) DeepCopyInto ¶
func (in *VirtualService) DeepCopyInto(out *VirtualService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualService) DeepCopyIstioObject ¶
func (in *VirtualService) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*VirtualService) DeepCopyObject ¶
func (in *VirtualService) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*VirtualService) GetObjectMeta ¶
func (in *VirtualService) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*VirtualService) GetSpec ¶
func (in *VirtualService) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*VirtualService) SetObjectMeta ¶
func (in *VirtualService) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*VirtualService) SetSpec ¶
func (in *VirtualService) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type VirtualServiceList ¶
type VirtualServiceList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []VirtualService `json:"items"` }
VirtualServiceList is the generic Kubernetes API list wrapper VirtualServiceList starts with uppercase as it maps a "kind":"VirtualServiceList" Istio response.
func (*VirtualServiceList) DeepCopy ¶
func (in *VirtualServiceList) DeepCopy() *VirtualServiceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceList.
func (*VirtualServiceList) DeepCopyInto ¶
func (in *VirtualServiceList) DeepCopyInto(out *VirtualServiceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualServiceList) DeepCopyObject ¶
func (in *VirtualServiceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*VirtualServiceList) GetItems ¶
func (in *VirtualServiceList) GetItems() []IstioObject
GetItems from a wrapper
Source Files ¶
- client.go
- istio_adapter_circonus_type.go
- istio_adapter_denier_type.go
- istio_adapter_fluentd_type.go
- istio_adapter_kubernetesenv_type.go
- istio_adapter_list_checker_type.go
- istio_adapter_memquota_type.go
- istio_adapter_opa_type.go
- istio_adapter_prometheus_type.go
- istio_adapter_rbac_type.go
- istio_adapter_servicecontrol_type.go
- istio_adapter_solarwinds_type.go
- istio_adapter_stackdriver_type.go
- istio_adapter_statsd_type.go
- istio_adapter_stdio_type.go
- istio_destination_policy_type.go
- istio_destination_rule_type.go
- istio_details_service.go
- istio_gateway_type.go
- istio_route_rule_type.go
- istio_rule_type.go
- istio_rules_service.go
- istio_template_apikey_type.go
- istio_template_authorization_type.go
- istio_template_checknothing_type.go
- istio_template_kubernetes_type.go
- istio_template_list_entry_type.go
- istio_template_logentry_type.go
- istio_template_metric_type.go
- istio_template_quota_type.go
- istio_template_reportnothing_type.go
- istio_template_servicecontrolreport_type.go
- istio_virtual_service_type.go
- kubernetes_service.go
- mock_istio_object_type.go
- os_route_client.go
- types.go