Documentation ¶
Index ¶
- type DummyClient
- func (c *DummyClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (c *DummyClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (c *DummyClient) RESTMapper() meta.RESTMapper
- func (c *DummyClient) Scheme() *runtime.Scheme
- func (c *DummyClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type TestReconciler
- func (r *TestReconciler) ExtractJobStatus(job client.Object) (*commonv1.JobStatus, error)
- func (r *TestReconciler) ExtractReplicasSpec(job client.Object) (map[commonv1.ReplicaType]*commonv1.ReplicaSpec, error)
- func (r *TestReconciler) ExtractRunPolicy(job client.Object) (*commonv1.RunPolicy, error)
- func (r *TestReconciler) GetDefaultContainerName() string
- func (r *TestReconciler) GetJob(ctx context.Context, req ctrl.Request) (client.Object, error)
- func (r *TestReconciler) GetPodGroupForJob(ctx context.Context, job client.Object) (client.Object, error)
- func (r *TestReconciler) GetPodsForJob(ctx context.Context, job client.Object) ([]*corev1.Pod, error)
- func (r *TestReconciler) GetReconcilerName() string
- func (r *TestReconciler) GetServicesForJob(ctx context.Context, job client.Object) ([]*corev1.Service, error)
- func (r *TestReconciler) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, ...) bool
- func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyClient ¶
type DummyClient struct { client.Reader client.Writer client.StatusClient Cache []client.Object // contains filtered or unexported fields }
func (*DummyClient) Create ¶
func (c *DummyClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (*DummyClient) Delete ¶
func (c *DummyClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (*DummyClient) RESTMapper ¶
func (c *DummyClient) RESTMapper() meta.RESTMapper
func (*DummyClient) Scheme ¶
func (c *DummyClient) Scheme() *runtime.Scheme
func (*DummyClient) Update ¶
func (c *DummyClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type TestReconciler ¶
type TestReconciler struct { common_reconciler.ReconcilerUtil common_reconciler.ServiceReconciler common_reconciler.PodReconciler common_reconciler.VolcanoReconciler common_reconciler.JobReconciler DC *DummyClient Job *v1.TestJob Pods []*corev1.Pod Services []*corev1.Service PodGroup client.Object }
func NewTestReconciler ¶
func NewTestReconciler() *TestReconciler
func (*TestReconciler) ExtractJobStatus ¶
func (*TestReconciler) ExtractReplicasSpec ¶
func (r *TestReconciler) ExtractReplicasSpec(job client.Object) (map[commonv1.ReplicaType]*commonv1.ReplicaSpec, error)
func (*TestReconciler) ExtractRunPolicy ¶
func (*TestReconciler) GetDefaultContainerName ¶
func (r *TestReconciler) GetDefaultContainerName() string
func (*TestReconciler) GetPodGroupForJob ¶
func (*TestReconciler) GetPodsForJob ¶
func (*TestReconciler) GetReconcilerName ¶
func (r *TestReconciler) GetReconcilerName() string
func (*TestReconciler) GetServicesForJob ¶
func (*TestReconciler) IsMasterRole ¶
func (r *TestReconciler) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, rtype commonv1.ReplicaType, index int) bool
Click to show internal directories.
Click to hide internal directories.