Documentation ¶
Index ¶
- func Dump(option DumpOption) error
- type ChanData
- type ClientSet
- func (c *ClientSet) GetCRD() []interface{}
- func (c *ClientSet) GetClusterResources(namespace string) map[string]map[string]map[string][]interface{}
- func (c *ClientSet) GetConfigMap(namespace string) []corev1.ConfigMap
- func (c *ClientSet) GetCronJobs(namespace string) []batchv1.CronJob
- func (c *ClientSet) GetDeployment(namespace string) []appsv1.Deployment
- func (c *ClientSet) GetJobs(namespace string) []batchv1.Job
- func (c *ClientSet) GetMultiCluster() ([]v1alpha2.MultiCluster, error)
- func (c *ClientSet) GetNamespaces() []corev1.Namespace
- func (c *ClientSet) GetNodes() []corev1.Node
- func (c *ClientSet) GetPersistentVolumeClaims(namespace string) []corev1.PersistentVolumeClaim
- func (c *ClientSet) GetPersistentVolumes() []corev1.PersistentVolume
- func (c *ClientSet) GetPods(namespace string) []corev1.Pod
- func (c *ClientSet) GetSecrets(namespace string) []corev1.Secret
- func (c *ClientSet) GetServices(namespace string) []corev1.Service
- func (c *ClientSet) GetStatefulSets(namespace string) []appsv1.StatefulSet
- func (c *ClientSet) GetStorageClasses() []interface{}
- type DumpFile
- type DumpFileChan
- type DumpOption
- type DumpResources
- type TarOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dump ¶
func Dump(option DumpOption) error
Types ¶
type ClientSet ¶
type ClientSet struct {
Client *kubernetes.Clientset
}
func NewDumpOption ¶
func NewDumpOption(client *kubernetes.Clientset) *ClientSet
func (*ClientSet) GetClusterResources ¶
func (*ClientSet) GetConfigMap ¶
func (*ClientSet) GetDeployment ¶
func (c *ClientSet) GetDeployment(namespace string) []appsv1.Deployment
func (*ClientSet) GetMultiCluster ¶
func (c *ClientSet) GetMultiCluster() ([]v1alpha2.MultiCluster, error)
func (*ClientSet) GetNamespaces ¶
func (*ClientSet) GetPersistentVolumeClaims ¶
func (c *ClientSet) GetPersistentVolumeClaims(namespace string) []corev1.PersistentVolumeClaim
func (*ClientSet) GetPersistentVolumes ¶
func (c *ClientSet) GetPersistentVolumes() []corev1.PersistentVolume
func (*ClientSet) GetStatefulSets ¶
func (c *ClientSet) GetStatefulSets(namespace string) []appsv1.StatefulSet
func (*ClientSet) GetStorageClasses ¶
func (c *ClientSet) GetStorageClasses() []interface{}
type DumpFileChan ¶
type DumpFileChan struct { DumpOption OutFileChan chan ChanData Excel *excelize.File WaitGroup sync.WaitGroup }
func NewFileChan ¶
func NewFileChan(option DumpOption, excel *excelize.File) *DumpFileChan
func (*DumpFileChan) CreateFile ¶
func (c *DumpFileChan) CreateFile(path string) (*os.File, error)
func (*DumpFileChan) GetWireData ¶
func (c *DumpFileChan) GetWireData(o ChanData) []byte
func (*DumpFileChan) ReadData ¶
func (c *DumpFileChan) ReadData(client *ClientSet, clusterName string)
func (*DumpFileChan) SendData ¶
func (c *DumpFileChan) SendData(data ChanData, isContinue bool)
func (*DumpFileChan) WriteFile ¶
func (c *DumpFileChan) WriteFile() error
type DumpOption ¶
type DumpOption struct { Namespace []string KubeConfig string AllNamespaces bool OutputDir string Type string Tar bool Queue int Logger bool }
func (*DumpOption) GetOutputDir ¶
func (c *DumpOption) GetOutputDir() string
type DumpResources ¶
type DumpResources interface { GetNodes() []corev1.Node GetNamespaces() []corev1.Namespace GetConfigMap(namespace string) []corev1.ConfigMap GetServices(namespace string) []corev1.Service GetSecrets(namespace string) []corev1.Secret GetDeployment(namespace string) []appsv1.Deployment GetStatefulSets(namespace string) []appsv1.StatefulSet GetPods(namespace string) []corev1.Pod GetPersistentVolumeClaims(namespace string) []corev1.PersistentVolumeClaim GetPersistentVolumes() []corev1.PersistentVolume GetStorageClasses() []interface{} GetJobs(namespace string) []batchv1.Job GetCronJobs(namespace string) []batchv1.CronJob GetCRD() []interface{} GetClusterResources(namespace string) map[string]map[string]map[string][]interface{} GetMultiCluster() ([]v1alpha2.MultiCluster, error) }
type TarOptions ¶
type TarOptions struct {
DumpOption
}
func NewTar ¶
func NewTar(option DumpOption) *TarOptions
func (TarOptions) Run ¶
func (t TarOptions) Run() error
Click to show internal directories.
Click to hide internal directories.