Versions in this module Expand all Collapse all v4 v4.6.0 Dec 20, 2024 Changes in this version + const ApiVersion + const KindConfigMap + const KindSecret + const KindStorageBackendClaim + const XuanWuApiVersion + const YamlSeparator + func AnalyseBackendExist(jsonStr string) (interface{}, error) + func ConfigOneBackend(backendConfig *BackendConfiguration) error + func FetchBackendConfig(namespace string, names ...string) (map[string]*BackendConfiguration, error) + func FetchConfiguredBackends(namespace string) (map[string]*BackendConfiguration, error) + func LoadBackendsFromConfigMap(configmap corev1.ConfigMap, fromLocalFile string) (map[string]*BackendConfiguration, error) + func LoadBackendsFromJson(filename string) (map[string]*BackendConfiguration, error) + func LoadBackendsFromYaml(filename string) (map[string]*BackendConfiguration, error) + func RegisterCollector(name PodType, collector FileLogsCollect) + func RegisterIdentifyPodTypeFunc(name PodType, f func(pod *coreV1.Pod) bool) + type Backend struct + func NewBackend(resource *Resource) *Backend + func (b *Backend) Create() error + func (b *Backend) Delete() error + func (b *Backend) Get() error + func (b *Backend) LoadBackendFile() (map[string]*BackendConfiguration, error) + func (b *Backend) Update() error + type BackendConfigShow struct + Configured string + Name string + Number string + Storage string + Urls string + type BackendConfiguration struct + AccountName string + Configured bool + MaxClientThreads string + MetroBackend string + MetrovStorePairID string + Name string + NameSpace string + Parameters struct{ ... } + Pools []string + Provisioner string + Storage string + SupportedTopologies []map[string]interface{} + Urls []string + VstoreName string + func LoadMultipleBackendFromConfigmap(jsonStr string) ([]*BackendConfiguration, error) + func LoadSingleBackendFromConfigmap(jsonStr string) ([]*BackendConfiguration, error) + func MergeBackends(notConfigured, configured map[string]*BackendConfiguration) []*BackendConfiguration + func (b *BackendConfiguration) ToConfigMapConfig() (ConfigMapConfig, error) + func (b *BackendConfiguration) ToSecretConfig() (SecretConfig, error) + func (b *BackendConfiguration) ToStorageBackendClaimConfig() StorageBackendClaimConfig + type BackendShow struct + Name string + Namespace string + Online string + Protocol string + Sn string + Status string + StorageType string + Url string + type BackendShowWide struct + Name string + Namespace string + Online string + Protocol string + Sn string + Status string + StorageBackendContentName string + StorageType string + Url string + VendorName string + func (b *BackendShowWide) ShowWithClaimOption(claim xuanwuv1.StorageBackendClaim) *BackendShowWide + func (b *BackendShowWide) ShowWithConfigOption(configuration BackendConfiguration) *BackendShowWide + func (b *BackendShowWide) ShowWithContentOption(content xuanwuv1.StorageBackendContent) *BackendShowWide + func (b *BackendShowWide) ToBackendShow() BackendShow + type BaseFileLogsCollect struct + func (b *BaseFileLogsCollect) CopyToLocal(namespace, nodeName, podName, containerName string) error + func (b *BaseFileLogsCollect) GetHostInformation(namespace, containerName, nodeName, podName string) error + type Cert struct + func NewCert(resource *Resource) *Cert + func (c *Cert) Create() error + func (c *Cert) Delete() error + func (c *Cert) Get() error + func (c *Cert) LoadCertFile() (*CertConfig, error) + func (c *Cert) LoadCertsFromDate(Data []byte) (*CertConfig, error) + func (c *Cert) Update() error + type CertConfig struct + Cert []byte + Name string + Namespace string + func (c *CertConfig) ToCertSecret() corev1.Secret + type CertShow struct + BoundBackend string + Name string + Namespace string + type ConfigMapConfig struct + JsonData string + Name string + Namespace string + func (c *ConfigMapConfig) ToConfigMap() corev1.ConfigMap + type Display struct + func NewDisplay() *Display + func (d *Display) Add(prefixDesc string, f func()) + func (d *Display) Show(ctx context.Context) + type FileLogsCollect interface + CopyToLocal func(namespace, nodeName, podName, containerName string) error + GetFileLogs func(namespace, podName, nodeName, fileLogPath string) (err error) + GetHostInformation func(namespace, containerName, nodeName, podName string) error + func LoadSupportedCollector(name PodType) (FileLogsCollect, error) + type FileLogsCollector struct + func (c *FileLogsCollector) GetFileLogs(namespace, podName, containerName, fileLogPath string) (err error) + type Logs struct + func NewLogs(resource *Resource) *Logs + func (lg *Logs) Collect() error + type NodeLogCollector struct + func NewNodeLogsCollector(podList []coreV1.Pod, transmitter *helper.TaskHandler, display *Display) *NodeLogCollector + func (n *NodeLogCollector) Collect() + type PodType byte + const CSI + const CSM + const UnKnow + const Xuanwu + type Resource struct + type ResourceBuilder struct + func NewResourceBuilder() *ResourceBuilder + func (b *ResourceBuilder) AllNamespaces(allNamespace bool) *ResourceBuilder + func (b *ResourceBuilder) AllNodes(isAllNodes bool) *ResourceBuilder + func (b *ResourceBuilder) BoundBackend(backend string) *ResourceBuilder + func (b *ResourceBuilder) Build() *Resource + func (b *ResourceBuilder) DefaultNamespace() *ResourceBuilder + func (b *ResourceBuilder) FileName(fileName string) *ResourceBuilder + func (b *ResourceBuilder) FileType(fileType string) *ResourceBuilder + func (b *ResourceBuilder) MaxNodeThreads(maxNodeThreads int) *ResourceBuilder + func (b *ResourceBuilder) Names(names ...string) *ResourceBuilder + func (b *ResourceBuilder) NamespaceParam(namespace string) *ResourceBuilder + func (b *ResourceBuilder) NodeName(nodeName string) *ResourceBuilder + func (b *ResourceBuilder) Output(output string) *ResourceBuilder + func (b *ResourceBuilder) ResourceNames(resource string, names ...string) *ResourceBuilder + func (b *ResourceBuilder) ResourceTypes(types ...string) *ResourceBuilder + func (b *ResourceBuilder) SelectAll(selectAll bool) *ResourceBuilder + func (b *ResourceBuilder) Selector(selector string) *ResourceBuilder + type SecretConfig struct + Name string + Namespace string + Pwd string + User string + func (c *SecretConfig) ToSecret() corev1.Secret + type Status struct + func (n *Status) Display() + type StorageBackendClaimConfig struct + ConfigmapMeta string + MaxClientThreads string + Name string + Namespace string + Provisioner string + SecretMeta string + func (c *StorageBackendClaimConfig) ToStorageBackendClaim() xuanwuv1.StorageBackendClaim + type TransmitTask struct + func (t *TransmitTask) Do() + type Validator struct + func (v *Validator) Validate() error + type ValidatorBuilder struct + func NewValidatorBuilder(resource *Resource) *ValidatorBuilder + func (b *ValidatorBuilder) Build() *Validator + func (b *ValidatorBuilder) ValidateBackend() *ValidatorBuilder + func (b *ValidatorBuilder) ValidateNameIsExist() *ValidatorBuilder + func (b *ValidatorBuilder) ValidateNameIsSingle() *ValidatorBuilder + func (b *ValidatorBuilder) ValidateOutputFormat() *ValidatorBuilder + func (b *ValidatorBuilder) ValidateSelector() *ValidatorBuilder