drivemgr

package
v0.4.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

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

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

Jump to

Keyboard shortcuts

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