Documentation ¶
Overview ¶
Package drivemgr contains a code for managers of storage hardware such as drives
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DriveManager ¶
type DriveManager interface { // get list of drives GetDrivesList() ([]*api.Drive, error) // manipulate of drive's led state, receive drive serial number and type of action // returns current led status or error Locate(serialNumber string, action int32) (currentStatus int32, err error) }
DriveManager is the interface for managers that provide information about drives on a node
type DriveServiceServerImpl ¶
type DriveServiceServerImpl struct {
// contains filtered or unexported fields
}
DriveServiceServerImpl is the implementation of gRPC server that gives possibility to invoke DriveManager's methods remotely
func NewDriveServer ¶
func NewDriveServer(logger *logrus.Logger, manager DriveManager) DriveServiceServerImpl
NewDriveServer is the constructor for DriveServiceServerImpl struct Receives logrus logger and implementation of DriveManager as parameters Returns an instance of DriveServiceServerImpl
func (*DriveServiceServerImpl) GetDrivesList ¶
func (svc *DriveServiceServerImpl) GetDrivesList(ctx context.Context, req *api.DrivesRequest) (*api.DrivesResponse, error)
GetDrivesList invokes DriveManager's GetDrivesList() and sends the response over gRPC Receives go context and DrivesRequest which contains node id Returns DrivesResponse with slice of api.Drives structs
func (*DriveServiceServerImpl) Locate ¶
func (svc *DriveServiceServerImpl) Locate(ctx context.Context, in *api.DriveLocateRequest) (*api.DriveLocateResponse, error)
Locate invokes DriveManager's Locate method for manipulation drive's LED state
Directories ¶
Path | Synopsis |
---|---|
Package idracmgr provides the iDRAC based implementation of DriveManager interface
|
Package idracmgr provides the iDRAC based implementation of DriveManager interface |
Package loopbackmgr contains DriveManager for test purposes based on loop devices
|
Package loopbackmgr contains DriveManager for test purposes based on loop devices |