Documentation ¶
Index ¶
- Constants
- Variables
- func CreateSnapshot(ctx context.Context, in *proto.VolumeSnapCreateRequest) (*proto.VolumeSnapCreateResponse, error)
- func DeleteSnapshot(ctx context.Context, in *proto.VolumeSnapDeleteRequest) (*proto.VolumeSnapDeleteResponse, error)
- func RunCStorVolumeGrpcServer(port int) error
- func StartServer(unixSockVar util.UnixSock, port string) error
- type CommandStatus
- type Server
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 ¶
func CreateSnapshot(ctx context.Context, in *proto.VolumeSnapCreateRequest) (*proto.VolumeSnapCreateResponse, error)
CreateSnapshot sends snapcreate command to istgt and returns the response
func DeleteSnapshot ¶
func DeleteSnapshot(ctx context.Context, in *proto.VolumeSnapDeleteRequest) (*proto.VolumeSnapDeleteResponse, error)
DeleteSnapshot sends snapdelete command to istgt and returns the response
func RunCStorVolumeGrpcServer ¶
RunCStorVolumeGrpcServer is Blocking call for listen for grpc requests of CStorVolume.
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
Click to show internal directories.
Click to hide internal directories.