Documentation
¶
Overview ¶
Package apicall defines many useful functions to fetch data by kubernetes api
Index ¶
- func GetClientTLSConfig[S scope.Object[F, T], F client.Object, T runtime.Object](ctx context.Context, c client.Client, obj F) (*tls.Config, error)
- func GetCluster[S scope.Object[F, T], F client.Object, T runtime.Object](ctx context.Context, c client.Client, obj F) (*v1alpha1.Cluster, error)
- func GetClusterByKey(ctx context.Context, c client.Client, ns, name string) (*v1alpha1.Cluster, error)
- func GetPod[S scope.Instance[F, T], F client.Object, T runtime.Instance](ctx context.Context, c client.Client, obj F) (*corev1.Pod, error)
- func GetPodIfExists[S scope.Instance[F, T], F client.Object, T runtime.Instance](ctx context.Context, c client.Client, obj F) (*corev1.Pod, error)
- func ListClusterInstances[S scope.InstanceList[F, T, L], F client.Object, T runtime.Instance, ...](ctx context.Context, c client.Client, ns, cluster string) ([]F, error)
- func ListGroups[S scope.GroupList[F, T, L], F client.Object, T runtime.Group, ...](ctx context.Context, c client.Client, ns, cluster string) ([]F, error)
- func ListInstances[GS scope.GroupInstance[GF, GT, IS], IS scope.List[IL, I], GF client.Object, ...](ctx context.Context, c client.Client, g GF) ([]I, error)
- func ListPeerInstances[S scope.InstanceList[F, T, L], F client.Object, T runtime.Instance, ...](ctx context.Context, c client.Client, in F) ([]F, error)
- func NewInstanceListerWatcher[GS scope.GroupInstance[GF, GT, IS], IS scope.List[IL, I], GF client.Object, ...](ctx context.Context, c client.Client, g GF) cache.ListerWatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientTLSConfig ¶
func GetCluster ¶
func GetClusterByKey ¶
func GetPodIfExists ¶
func ListClusterInstances ¶
func ListGroups ¶
func ListInstances ¶
func ListInstances[ GS scope.GroupInstance[GF, GT, IS], IS scope.List[IL, I], GF client.Object, GT runtime.Group, IL client.ObjectList, I client.Object, ](ctx context.Context, c client.Client, g GF) ([]I, error)
ListInstances returns instances managed by a specified group
func ListPeerInstances ¶
func ListPeerInstances[ S scope.InstanceList[F, T, L], F client.Object, T runtime.Instance, L client.ObjectList, ](ctx context.Context, c client.Client, in F) ([]F, error)
ListPeerInstances returns peers of an instance in a same cluster NOTE: - All peers in the same cluster will be returned - Input instance will also be returned
func NewInstanceListerWatcher ¶
func NewInstanceListerWatcher[ GS scope.GroupInstance[GF, GT, IS], IS scope.List[IL, I], GF client.Object, GT runtime.Group, IL client.ObjectList, I client.Object, ](ctx context.Context, c client.Client, g GF) cache.ListerWatcher
NewInstanceListerWatcher returns a cache.ListerWatcher for a group
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.