Documentation ¶
Overview ¶
Package storage xxx
Index ¶
- Constants
- type Interface
- type StorageClient
- func (sc *StorageClient) ListResources(clusterType, clusterID, resourceType string) (*common.ListStorageResourceResult, error)
- func (sc *StorageClient) SetTLSConfig(conf *tls.Config)
- func (sc *StorageClient) Start(ctx context.Context)
- func (sc *StorageClient) WatchClusterResources(clusterID, resourceType string) (chan *common.StorageEvent, error)
Constants ¶
View Source
const ( // BcsStorageDynamicAllResourceURI uri for query dynamic resource by bcs storage BcsStorageDynamicAllResourceURI = "/bcsstorage/v1/%s/dynamic/all_resources/clusters/%s/%s" // BcsStorageDynamicWatchResourceURI uri for watch dynamic resource by bcs storage BcsStorageDynamicWatchResourceURI = "/bcsstorage/v1/dynamic/watch/%s/%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { ListResources(clusterType, clusterID, resourceType string) (*common.ListStorageResourceResult, error) WatchClusterResources(clusterID, resourceType string) (chan *common.StorageEvent, error) }
Interface interface for storage
type StorageClient ¶
type StorageClient struct {
// contains filtered or unexported fields
}
StorageClient client for bcs storage
func NewStorageClient ¶
func NewStorageClient(zkAddr string) (*StorageClient, error)
NewStorageClient create storage client
func (*StorageClient) ListResources ¶
func (sc *StorageClient) ListResources(clusterType, clusterID, resourceType string) ( *common.ListStorageResourceResult, error)
ListResources list resources
func (*StorageClient) SetTLSConfig ¶
func (sc *StorageClient) SetTLSConfig(conf *tls.Config)
SetTLSConfig set tls config
func (*StorageClient) Start ¶
func (sc *StorageClient) Start(ctx context.Context)
Start start storage client
func (*StorageClient) WatchClusterResources ¶
func (sc *StorageClient) WatchClusterResources(clusterID, resourceType string) (chan *common.StorageEvent, error)
WatchClusterResources watch cluster resources
Click to show internal directories.
Click to hide internal directories.