snapshot

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolumeGrpcListenPort = 7777
	ProtocolVersion      = 1
)

constants

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandStatus

type CommandStatus struct {
	Response string `json:"response"`
}

CommandStatus is the response from istgt for control commands

type SnapClient

type SnapClient struct{}

SnapClient is used to perform real snap create and snap delete commands

func (*SnapClient) CreateSnapshot

func (s *SnapClient) CreateSnapshot(ip, volName, snapName string) (*v1proto.VolumeSnapCreateResponse, error)

CreateSnapshot creates snapshot by executing gRPC call

func (*SnapClient) DestroySnapshot

func (s *SnapClient) DestroySnapshot(ip, volName, snapName string) (*v1proto.VolumeSnapDeleteResponse, error)

DestroySnapshot destroys snapshots by executing gRPC calls

type Snapshot

type Snapshot struct {
	VolumeName   string
	SnapshotName string
	Namespace    string
	SnapClient   Snapshotter
}

Snapshot holds the information required to perform snapshot related operations

func (*Snapshot) CreateSnapshot

func (s *Snapshot) CreateSnapshot(clientset clientset.Interface) (*v1proto.VolumeSnapCreateResponse, error)

CreateSnapshot creates snapshot for provided CStor Volume TODO: Think better name something like CreateSnapshotByFetchingIP

func (*Snapshot) DeleteSnapshot

func (s *Snapshot) DeleteSnapshot(clientset clientset.Interface) (*v1proto.VolumeSnapDeleteResponse, error)

DeleteSnapshot deletes snapshot for provided volume

type Snapshotter

type Snapshotter interface {
	CreateSnapshot(ip, volumeName, namesapce string) (*v1proto.VolumeSnapCreateResponse, error)
	DestroySnapshot(ip, volumeName, namesapce string) (*v1proto.VolumeSnapDeleteResponse, error)
}

Snapshotter is used to perform snapshot operations on given volume

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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