client

package
v0.0.0-...-eccd397 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodNameKey      = "csi.storage.k8s.io/pod.name"
	PodNamespaceKey = "csi.storage.k8s.io/pod.namespace"

	BarNameKey = "bar-name"
)

Variables

This section is empty.

Functions

func GetProtocol

func GetProtocol(bkt *v1alpha1.Bucket) ([]byte, error)

func ParseVolumeContext

func ParseVolumeContext(volCtx map[string]string) (barname, podname, podns string, err error)

Types

type NodeClient

type NodeClient interface {
	GetBAR(ctx context.Context, pod *v1.Pod, barName, barNs string) (*v1alpha1.BucketAccessRequest, error)
	GetBA(ctx context.Context, pod *v1.Pod, baName string) (*v1alpha1.BucketAccess, error)
	GetBR(ctx context.Context, pod *v1.Pod, brName, brNs string) (*v1alpha1.BucketRequest, error)
	GetB(ctx context.Context, pod *v1.Pod, bName string) (*v1alpha1.Bucket, error)
	GetPod(ctx context.Context, podName, podNs string) (*v1.Pod, error)

	GetResources(ctx context.Context, barName, podName, podNs string) (bkt *v1alpha1.Bucket, ba *v1alpha1.BucketAccess, secret *v1.Secret, pod *v1.Pod, err error)

	AddBAFinalizer(ctx context.Context, ba *v1alpha1.BucketAccess, BAFinalizer string) error
	RemoveBAFinalizer(ctx context.Context, ba *v1alpha1.BucketAccess, BAFinalizer string) error

	Recorder() record.EventRecorder
}

func NewClientOrDie

func NewClientOrDie(driverName, nodeId string) NodeClient

type ProvisionerClient

type ProvisionerClient interface {
	MkdirAll(path string, perm os.FileMode) error
	RemoveAll(path string) error
	WriteFile(data []byte, filepath string) error
	ReadFile(filename string) ([]byte, error)
}

func NewProvisionerClient

func NewProvisionerClient() ProvisionerClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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