Documentation
¶
Index ¶
- Variables
- type Auth
- type Config
- type DeploymentClient
- type EventClient
- type Fetch
- type Helper
- func (h *Helper) GetDeployment(name string) (*appsv1.Deployment, error)
- func (h *Helper) GetNode(name string) (*corev1.Node, error)
- func (h *Helper) GetNodeIP(nodeName string, addrType string) (string, error)
- func (h *Helper) GetSVC(name string) (*corev1.Service, error)
- func (h *Helper) GetSVCNodePortByTargetPort(svcName string, targetPort int) (int, error)
- func (h *Helper) IsNamespaceExist(namespace string) bool
- func (h *Helper) ListEvent(opt metav1.ListOptions) (*corev1.EventList, error)
- func (h *Helper) ListPod(opt metav1.ListOptions) (*corev1.PodList, error)
- func (h *Helper) RunLeaseCron(ctx *context.Context)
- func (h *Helper) SetDeploymentClient()
- func (h *Helper) SetEventClient()
- func (h *Helper) SetKubeAuth()
- func (h *Helper) SetLeaseClient(id string, name string, namespace string)
- func (h *Helper) SetLeaseCron(schedule func())
- func (h *Helper) SetNamespaceClient()
- func (h *Helper) SetNodeClient()
- func (h *Helper) SetPodClient()
- func (h *Helper) SetSVCClient()
- type LeaseClient
- type NamespaceClient
- type NodeClient
- type PodClient
- type SVCClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InClusterAuth = "inCluster" OutOfClusterAuth = "outOfCluster" LeaseRun = leaderelection.RunOrDie )
Functions ¶
This section is empty.
Types ¶
type DeploymentClient ¶
type DeploymentClient interface {
Get(ctx context.Context, name string, opts metav1.GetOptions) (*appsv1.Deployment, error)
}
type EventClient ¶
type Helper ¶
type Helper struct { EventClient PodClient DeploymentClient NamespaceClient NodeClient SVCClient LeaseClient LeaseID string LeaseCallback leaderelection.LeaderCallbacks Config // contains filtered or unexported fields }
func (*Helper) GetDeployment ¶
func (h *Helper) GetDeployment(name string) (*appsv1.Deployment, error)
func (*Helper) GetSVCNodePortByTargetPort ¶
func (*Helper) IsNamespaceExist ¶
func (*Helper) RunLeaseCron ¶
func (*Helper) SetDeploymentClient ¶
func (h *Helper) SetDeploymentClient()
func (*Helper) SetEventClient ¶
func (h *Helper) SetEventClient()
func (*Helper) SetKubeAuth ¶
func (h *Helper) SetKubeAuth()
func (*Helper) SetLeaseClient ¶
func (*Helper) SetLeaseCron ¶
func (h *Helper) SetLeaseCron(schedule func())
func (*Helper) SetNamespaceClient ¶
func (h *Helper) SetNamespaceClient()
func (*Helper) SetNodeClient ¶
func (h *Helper) SetNodeClient()
func (*Helper) SetPodClient ¶
func (h *Helper) SetPodClient()
func (*Helper) SetSVCClient ¶
func (h *Helper) SetSVCClient()
type LeaseClient ¶
type LeaseClient interface { Get(context.Context) (*resourcelock.LeaderElectionRecord, []byte, error) Create(context.Context, resourcelock.LeaderElectionRecord) error Update(context.Context, resourcelock.LeaderElectionRecord) error RecordEvent(string) Identity() string Describe() string }
type NamespaceClient ¶
type NodeClient ¶
Click to show internal directories.
Click to hide internal directories.