Documentation
¶
Index ¶
- Constants
- Variables
- func EstimateRequest(ioReq string) (*v1alpha1.IOBandwidth, error)
- func GetCRName(n string, suff string) string
- func GetSliceIdx(target string, s []string) int
- type Config
- type DeviceType
- type DiskInfo
- type DiskInfos
- type IODriver
- func (c *IODriver) AddNodeDiskIOStatsCR(obj interface{})
- func (e *IODriver) CreateNodeDiskDeviceCR(ctx context.Context, c *v1alpha1.NodeDiskDevice) error
- func (e *IODriver) GetNodeDiskIOStats(ctx context.Context) (*v1alpha1.NodeDiskIOStats, error)
- func (c *IODriver) ProcessProfile(ctx context.Context, di *DiskInfos) error
- func (c *IODriver) Run(ctx context.Context)
- func (e *IODriver) UpdateNodeDiskIOInfoStatus(ctx context.Context, toUpdate map[string]v1alpha1.IOBandwidth) error
- func (c *IODriver) UpdateNodeDiskIOStatsCR(oldObj, newObj interface{})
- func (c *IODriver) WatchNodeDiskIOStats(ctx context.Context) error
- type IORequest
- type PodCrInfo
Constants ¶
View Source
const ( NodeDiskDeviceCRSuffix string = "nodediskdevice" NodeDiskIOInfoCRSuffix string = "nodediskiostats" CRNameSpace string = "ioi-system" DiskIOAnnotation string = "blockio.kubernetes.io/resources" NodeIOStatusCR string = "NodeDiskIOStats" APIVersion string = "ioi.intel.com/v1" PeriodicUpdateInterval time.Duration = 5 * time.Second Mi float64 = 1024 * 1024 EmptyDir DeviceType = "emptyDir" Others DeviceType = "others" )
View Source
const (
FakeDeviceID = "fakeDevice"
)
Variables ¶
View Source
var ( MinDefaultIOBW resource.Quantity = resource.MustParse("5Mi") MinDefaultTotalIOBW resource.Quantity = resource.MustParse("10Mi") UpdateBackoff = wait.Backoff{ Steps: 3, Duration: 100 * time.Millisecond, Jitter: 1.0, } )
View Source
var BlockSize = []string{"512", "1k", "4k", "8k", "16k", "32k"}
Functions ¶
func EstimateRequest ¶
func EstimateRequest(ioReq string) (*v1alpha1.IOBandwidth, error)
ioRequest example: {"rbps": "30Mi", "wbps": "20Mi", "blocksize": "4k"}
func GetSliceIdx ¶
Types ¶
type DeviceType ¶
type DeviceType string
type DiskInfo ¶
type DiskInfo struct { Name string `json:"name,omitempty"` Model string `json:"model,omitempty"` Vendor string `json:"vendor,omitempty"` MajorMinor string `json:"majMin,omitempty"` Type DeviceType `json:"type,omitempty"` MountPoint string `json:"mountPoint,omitempty"` Capacity string `json:"capacity,omitempty"` TotalBPS resource.Quantity `json:"totalBps,omitempty"` TotalRBPS resource.Quantity `json:"totalRbps,omitempty"` TotalWBPS resource.Quantity `json:"totalWbps,omitempty"` ReadRatio map[string]float64 `json:"read_ratio,omitempty"` WriteRatio map[string]float64 `json:"write_ratio,omitempty"` }
func GetFakeDevice ¶
func GetFakeDevice() *DiskInfo
type DiskInfos ¶
func GetDiskProfile ¶
func GetDiskProfile() *DiskInfos
GetDiskProfile returns the disk profile result with fake device id and fake device info Customize your own profile tool to profile disks
type IODriver ¶
type IODriver struct {
// contains filtered or unexported fields
}
func NewIODriver ¶
func (*IODriver) AddNodeDiskIOStatsCR ¶
func (c *IODriver) AddNodeDiskIOStatsCR(obj interface{})
func (*IODriver) CreateNodeDiskDeviceCR ¶
func (*IODriver) GetNodeDiskIOStats ¶
func (*IODriver) ProcessProfile ¶
get disk profile result and create CR
func (*IODriver) UpdateNodeDiskIOInfoStatus ¶
func (*IODriver) UpdateNodeDiskIOStatsCR ¶
func (c *IODriver) UpdateNodeDiskIOStatsCR(oldObj, newObj interface{})
Click to show internal directories.
Click to hide internal directories.