Documentation
¶
Index ¶
- Constants
- type EMQXReconciler
- type EventsByLastTimestamp
- type GetRebalanceStatusFunc
- type PodsByCreationTimestamp
- type PodsByNameNewer
- type PodsByNameOlder
- type RebalanceReconciler
- type ReplicaSetsByCreationTimestamp
- type StartRebalanceFunc
- type StatefulSetsByCreationTimestamp
- type StopRebalanceFunc
Constants ¶
const ( ApiRebalanceV4 = "api/v4/load_rebalance" ApiRebalanceV5 = "api/v5/load_rebalance" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EMQXReconciler ¶
type EMQXReconciler struct { *handler.Handler Clientset *kubernetes.Clientset Config *rest.Config Scheme *runtime.Scheme EventRecorder record.EventRecorder }
EMQXReconciler reconciles a EMQX object
func NewEMQXReconciler ¶
func NewEMQXReconciler(mgr manager.Manager) *EMQXReconciler
func (*EMQXReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the EMQX object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*EMQXReconciler) SetupWithManager ¶
func (r *EMQXReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type EventsByLastTimestamp ¶
EventsByLastTimestamp sorts a list of Event by last timestamp, using their creation timestamp as a tie breaker.
func (EventsByLastTimestamp) Len ¶
func (o EventsByLastTimestamp) Len() int
func (EventsByLastTimestamp) Less ¶
func (o EventsByLastTimestamp) Less(i, j int) bool
func (EventsByLastTimestamp) Swap ¶
func (o EventsByLastTimestamp) Swap(i, j int)
type GetRebalanceStatusFunc ¶
type GetRebalanceStatusFunc func(emqx client.Object, requester innerReq.RequesterInterface) ([]appsv2beta1.RebalanceState, error)
Rebalance Handler
type PodsByCreationTimestamp ¶
PodsByCreationTimestamp sorts a list of Pod by creation timestamp, using their names as a tie breaker.
func (PodsByCreationTimestamp) Len ¶
func (o PodsByCreationTimestamp) Len() int
func (PodsByCreationTimestamp) Less ¶
func (o PodsByCreationTimestamp) Less(i, j int) bool
func (PodsByCreationTimestamp) Swap ¶
func (o PodsByCreationTimestamp) Swap(i, j int)
type PodsByNameNewer ¶
PodsByNameNewer sorts a list of Pod by size in descending order, using their creation timestamp or name as a tie breaker. By using the creation timestamp, this sorts from new to old replica sets.
func (PodsByNameNewer) Len ¶
func (o PodsByNameNewer) Len() int
func (PodsByNameNewer) Less ¶
func (o PodsByNameNewer) Less(i, j int) bool
func (PodsByNameNewer) Swap ¶
func (o PodsByNameNewer) Swap(i, j int)
type PodsByNameOlder ¶
PodsByNameOlder sorts a list of Pod by size in descending order, using their creation timestamp or name as a tie breaker. By using the creation timestamp, this sorts from old to new replica sets.
func (PodsByNameOlder) Len ¶
func (o PodsByNameOlder) Len() int
func (PodsByNameOlder) Less ¶
func (o PodsByNameOlder) Less(i, j int) bool
func (PodsByNameOlder) Swap ¶
func (o PodsByNameOlder) Swap(i, j int)
type RebalanceReconciler ¶
type RebalanceReconciler struct { Client client.Client Clientset *kubernetes.Clientset Config *rest.Config EventRecorder record.EventRecorder }
RebalanceReconciler reconciles a Rebalance object
func NewRebalanceReconciler ¶
func NewRebalanceReconciler(mgr manager.Manager) *RebalanceReconciler
func (*RebalanceReconciler) SetupWithManager ¶
func (r *RebalanceReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ReplicaSetsByCreationTimestamp ¶
type ReplicaSetsByCreationTimestamp []*appsv1.ReplicaSet
ReplicaSetsByCreationTimestamp sorts a list of ReplicaSet by creation timestamp, using their names as a tie breaker.
func (ReplicaSetsByCreationTimestamp) Len ¶
func (o ReplicaSetsByCreationTimestamp) Len() int
func (ReplicaSetsByCreationTimestamp) Less ¶
func (o ReplicaSetsByCreationTimestamp) Less(i, j int) bool
func (ReplicaSetsByCreationTimestamp) Swap ¶
func (o ReplicaSetsByCreationTimestamp) Swap(i, j int)
type StartRebalanceFunc ¶
type StartRebalanceFunc func(emqx client.Object, requester innerReq.RequesterInterface, rebalance *appsv2beta1.Rebalance) error
type StatefulSetsByCreationTimestamp ¶
type StatefulSetsByCreationTimestamp []*appsv1.StatefulSet
StatefulSetsByCreationTimestamp sorts a list of StatefulSet by creation timestamp, using their names as a tie breaker.
func (StatefulSetsByCreationTimestamp) Len ¶
func (o StatefulSetsByCreationTimestamp) Len() int
func (StatefulSetsByCreationTimestamp) Less ¶
func (o StatefulSetsByCreationTimestamp) Less(i, j int) bool
func (StatefulSetsByCreationTimestamp) Swap ¶
func (o StatefulSetsByCreationTimestamp) Swap(i, j int)
type StopRebalanceFunc ¶
type StopRebalanceFunc func(emqx client.Object, requester innerReq.RequesterInterface, rebalance *appsv2beta1.Rebalance) error