storage

package
v1.19.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL