client

package
v1.12.0 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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolumeGrpcListenPort = 7777
	CmdSnapCreate        = "SNAPCREATE"
	CmdSnapDestroy       = "SNAPDESTROY"
	//IoWaitTime is the time interval for which the IO has to be stopped before doing snapshot operation
	IoWaitTime = 10
	//TotalWaitTime is the max time duration to wait for doing snapshot operation on all the replicas
	TotalWaitTime   = 60
	ProtocolVersion = 1
)

constants

Variables

View Source
var APIUnixSockVar util.UnixSock

APIUnixSockVar is unix socker variable

Functions

func CreateSnapshot

CreateSnapshot sends snapcreate command to istgt and returns the response

func DeleteSnapshot

DeleteSnapshot sends snapdelete command to istgt and returns the response

func RunCStorVolumeGrpcServer

func RunCStorVolumeGrpcServer(port int) error

RunCStorVolumeGrpcServer is Blocking call for listen for grpc requests of CStorVolume.

func StartServer

func StartServer(unixSockVar util.UnixSock, port string) error

StartServer instantiates CStorVolume gRPC server and watches for snapshot requests.

Types

type CommandStatus

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

CommandStatus is the response from istgt for control commands

type Server

type Server struct {
}

Server represents the gRPC server

func (*Server) RunVolumeSnapCreateCommand

func (s *Server) RunVolumeSnapCreateCommand(ctx context.Context, in *proto.VolumeSnapCreateRequest) (*proto.VolumeSnapCreateResponse, error)

RunVolumeSnapCreateCommand performs snapshot create operation and sends back the response

func (*Server) RunVolumeSnapDeleteCommand

func (s *Server) RunVolumeSnapDeleteCommand(ctx context.Context, in *proto.VolumeSnapDeleteRequest) (*proto.VolumeSnapDeleteResponse, error)

RunVolumeSnapDeleteCommand performs snapshot create operation and sends back the response

Jump to

Keyboard shortcuts

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