Documentation
¶
Index ¶
- func FetchCronjobs(ctx context.Context, Client client.Client, ...) (*batchv1.CronJobList, error)
- func FetchDeployments(ctx context.Context, Client client.Client, ...) (*appsv1.DeploymentList, error)
- func FetchReplicaSets(ctx context.Context, Client client.Client, ...) (*appsv1.ReplicaSetList, error)
- func FetchStatefulsets(ctx context.Context, Client client.Client, ...) (*appsv1.StatefulSetList, error)
- func GetCronjob(ctx context.Context, Client client.Client, resource StatusResource) (*batchv1.CronJob, error)
- func GetCronjobListNames(objects *batchv1.CronJobList) []string
- func GetDeployment(ctx context.Context, Client client.Client, resource ReplicaResource) (*appsv1.Deployment, error)
- func GetDeploymentListNames(objects *appsv1.DeploymentList) []string
- func GetReplicaSet(ctx context.Context, Client client.Client, resource ReplicaResource) (*appsv1.ReplicaSet, error)
- func GetReplicaSetListNames(objects *appsv1.ReplicaSetList) []string
- func GetStatefulSet(ctx context.Context, Client client.Client, resource ReplicaResource) (*appsv1.StatefulSet, error)
- func GetStatefulsetListNames(objects *appsv1.StatefulSetList) []string
- type Object
- type ReplicaResource
- func (o ReplicaResource) AddToList(replicasMap ReplicaResourceMap)
- func (o ReplicaResource) GetName() string
- func (o ReplicaResource) GetNamespace() string
- func (o ReplicaResource) PutToSleep(ctx context.Context, Client client.Client) []string
- func (o ReplicaResource) Sleep(ctx context.Context, Client client.Client) (int32, error)
- func (o ReplicaResource) UpdateClient(ctx context.Context, Client client.Client) error
- func (o ReplicaResource) Wake(ctx context.Context, Client client.Client) error
- type ReplicaResourceMap
- type Resource
- type ResourceInt
- type ResourceMap
- type StatusResource
- func (o StatusResource) AddToList(statusMap StatusResourceMap)
- func (o StatusResource) GetName() string
- func (o StatusResource) GetNamespace() string
- func (o StatusResource) PutToSleep(ctx context.Context, Client client.Client) []string
- func (o StatusResource) Sleep(ctx context.Context, Client client.Client) (*bool, error)
- func (o StatusResource) UpdateClient(ctx context.Context, Client client.Client) error
- func (o StatusResource) Wake(ctx context.Context, Client client.Client) error
- type StatusResourceMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchCronjobs ¶
func FetchDeployments ¶
func FetchReplicaSets ¶
func FetchStatefulsets ¶
func GetCronjob ¶
func GetCronjobListNames ¶
func GetCronjobListNames(objects *batchv1.CronJobList) []string
func GetDeployment ¶
func GetDeployment(ctx context.Context, Client client.Client, resource ReplicaResource) (*appsv1.Deployment, error)
func GetDeploymentListNames ¶
func GetDeploymentListNames(objects *appsv1.DeploymentList) []string
func GetReplicaSet ¶
func GetReplicaSet(ctx context.Context, Client client.Client, resource ReplicaResource) (*appsv1.ReplicaSet, error)
func GetReplicaSetListNames ¶
func GetReplicaSetListNames(objects *appsv1.ReplicaSetList) []string
func GetStatefulSet ¶
func GetStatefulSet(ctx context.Context, Client client.Client, resource ReplicaResource) (*appsv1.StatefulSet, error)
func GetStatefulsetListNames ¶
func GetStatefulsetListNames(objects *appsv1.StatefulSetList) []string
Types ¶
type ReplicaResource ¶
func NewReplicaResource ¶
func NewReplicaResource(resourceKind, resourceName, resourceNamespace string, resourceReplica int32) ReplicaResource
func (ReplicaResource) AddToList ¶
func (o ReplicaResource) AddToList(replicasMap ReplicaResourceMap)
func (ReplicaResource) GetName ¶
func (o ReplicaResource) GetName() string
func (ReplicaResource) GetNamespace ¶
func (o ReplicaResource) GetNamespace() string
func (ReplicaResource) PutToSleep ¶
func (ReplicaResource) UpdateClient ¶
type ReplicaResourceMap ¶
type ReplicaResourceMap struct {
Items map[string][]ReplicaResource
}
func NewReplicaResourceMap ¶
func NewReplicaResourceMap() ReplicaResourceMap
func (ReplicaResourceMap) CastItems ¶
func (rm ReplicaResourceMap) CastItems(kind string) []ResourceInt
func (ReplicaResourceMap) GetLength ¶
func (rm ReplicaResourceMap) GetLength(itemName string) int
type ResourceInt ¶
type ResourceInt interface {
PutToSleep(ctx context.Context, Client client.Client) []string
UpdateClient(ctx context.Context, Client client.Client) error
Wake(ctx context.Context, Client client.Client) error
GetName() string
GetNamespace() string
}
func CastReplicaToGeneral ¶
func CastReplicaToGeneral(resource []ReplicaResource) []ResourceInt
func CastStatusToGeneral ¶
func CastStatusToGeneral(resource []StatusResource) []ResourceInt
type ResourceMap ¶
type ResourceMap interface {
GetLength(itemName string) int
CastItems(kind string) []ResourceInt
}
type StatusResource ¶
func NewStatusResource ¶
func NewStatusResource(resourceKind, resourceName, resourceNamespace string, resourceStatus bool) StatusResource
func (StatusResource) AddToList ¶
func (o StatusResource) AddToList(statusMap StatusResourceMap)
func (StatusResource) GetName ¶
func (o StatusResource) GetName() string
func (StatusResource) GetNamespace ¶
func (o StatusResource) GetNamespace() string
func (StatusResource) PutToSleep ¶
func (StatusResource) UpdateClient ¶
type StatusResourceMap ¶
type StatusResourceMap struct {
Items map[string][]StatusResource
}
func NewStatusResourceMap ¶
func NewStatusResourceMap() StatusResourceMap
func (StatusResourceMap) CastItems ¶
func (rm StatusResourceMap) CastItems(kind string) []ResourceInt
func (StatusResourceMap) GetLength ¶
func (rm StatusResourceMap) GetLength(itemName string) int
Click to show internal directories.
Click to hide internal directories.