fake

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright 2021 Intel Corporation.

SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus struct {
	Provider_   string
	DeviceName_ string
	Dimms_      []ndctl.Dimm
	Regions_    []ndctl.Region
}

func (*Bus) ActiveRegions

func (b *Bus) ActiveRegions() []ndctl.Region

func (*Bus) AllRegions

func (b *Bus) AllRegions() []ndctl.Region

func (*Bus) DeviceName

func (b *Bus) DeviceName() string

func (*Bus) Dimms

func (b *Bus) Dimms() []ndctl.Dimm

func (*Bus) GetRegionByPhysicalAddress

func (b *Bus) GetRegionByPhysicalAddress(address uint64) ndctl.Region

func (*Bus) Provider

func (b *Bus) Provider() string

type Context

type Context struct {
	Buses []ndctl.Bus
}

func NewContext

func NewContext(ctx *Context) *Context

NewContext initializes the cross-references between items.

func (*Context) Free

func (ctx *Context) Free()

func (*Context) GetBuses

func (ctx *Context) GetBuses() []ndctl.Bus

type Dimm

type Dimm struct {
	Enabled_    bool
	Active_     bool
	ID_         string
	PhysicalID_ int
	DeviceName_ string
	Handle_     int16
}

func (*Dimm) Active

func (d *Dimm) Active() bool

func (*Dimm) DeviceName

func (d *Dimm) DeviceName() string

func (*Dimm) Enabled

func (d *Dimm) Enabled() bool

func (*Dimm) Handle

func (d *Dimm) Handle() int16

func (*Dimm) ID

func (d *Dimm) ID() string

func (*Dimm) PhysicalID

func (d *Dimm) PhysicalID() int

type Mapping

type Mapping struct {
	Offset_   uint64
	Length_   uint64
	Position_ int

	Region_ ndctl.Region
	Dimm_   ndctl.Dimm
}

func (*Mapping) Dimm

func (m *Mapping) Dimm() ndctl.Dimm

func (*Mapping) Length

func (m *Mapping) Length() uint64

func (*Mapping) Offset

func (m *Mapping) Offset() uint64

func (*Mapping) Position

func (m *Mapping) Position() int

func (*Mapping) Region

func (m *Mapping) Region() ndctl.Region

type Namespace

type Namespace struct {
	ID_              uint
	Name_            string
	DeviceName_      string
	BlockDeviceName_ string
	Size_            uint64
	Overhead_        uint64
	Mode_            ndctl.NamespaceMode
	Type_            ndctl.NamespaceType
	Enabled_         bool
	Active_          bool
	UUID_            uuid.UUID
	Location_        ndctl.MapLocation

	Region_ ndctl.Region
}

func (*Namespace) Active

func (ns *Namespace) Active() bool

func (*Namespace) BlockDeviceName

func (ns *Namespace) BlockDeviceName() string

func (*Namespace) DeviceName

func (ns *Namespace) DeviceName() string

func (*Namespace) Disable

func (ns *Namespace) Disable() error

func (*Namespace) Enable

func (ns *Namespace) Enable() error

func (*Namespace) Enabled

func (ns *Namespace) Enabled() bool

func (*Namespace) ID

func (ns *Namespace) ID() uint

func (*Namespace) Location

func (ns *Namespace) Location() ndctl.MapLocation

func (*Namespace) Mode

func (ns *Namespace) Mode() ndctl.NamespaceMode

func (*Namespace) Name

func (ns *Namespace) Name() string

func (*Namespace) RawSize

func (ns *Namespace) RawSize() uint64

func (*Namespace) Region

func (ns *Namespace) Region() ndctl.Region

func (*Namespace) SetAltName

func (ns *Namespace) SetAltName(name string) error

func (*Namespace) SetEnforceMode

func (ns *Namespace) SetEnforceMode(mode ndctl.NamespaceMode) error

func (*Namespace) SetPfnSeed

func (ns *Namespace) SetPfnSeed(loc ndctl.MapLocation, align uint64) error

func (*Namespace) SetRawMode

func (ns *Namespace) SetRawMode(raw bool) error

func (*Namespace) SetSectorSize

func (ns *Namespace) SetSectorSize(sectorSize uint64) error

func (*Namespace) SetSize

func (ns *Namespace) SetSize(size uint64) error

func (*Namespace) SetUUID

func (ns *Namespace) SetUUID(uid uuid.UUID) error

func (*Namespace) Size

func (ns *Namespace) Size() uint64

func (*Namespace) Type

func (ns *Namespace) Type() ndctl.NamespaceType

func (*Namespace) UUID

func (ns *Namespace) UUID() uuid.UUID

type Region

type Region struct {
	ID_                 uint
	DeviceName_         string
	Size_               uint64
	AvailableSize_      uint64
	MaxAvailableExtent_ uint64
	Type_               ndctl.RegionType
	TypeName_           string
	Enabled_            bool
	Readonly_           bool
	InterleaveWays_     uint64
	RegionAlign_        uint64

	Mappings_   []ndctl.Mapping
	Namespaces_ []ndctl.Namespace
	Bus_        ndctl.Bus
}

func (*Region) ActiveNamespaces

func (r *Region) ActiveNamespaces() []ndctl.Namespace

func (*Region) AllNamespaces

func (r *Region) AllNamespaces() []ndctl.Namespace

func (*Region) AvailableSize

func (r *Region) AvailableSize() uint64

func (*Region) Bus

func (r *Region) Bus() ndctl.Bus

func (*Region) CreateNamespace

func (r *Region) CreateNamespace(ctx context.Context, opts ndctl.CreateNamespaceOpts) (ndctl.Namespace, error)

func (*Region) DestroyNamespace

func (r *Region) DestroyNamespace(ns ndctl.Namespace, force bool) error

func (*Region) DeviceName

func (r *Region) DeviceName() string

func (*Region) Enabled

func (r *Region) Enabled() bool

func (*Region) FsdaxAlignment

func (r *Region) FsdaxAlignment() uint64

func (*Region) GetAlign

func (r *Region) GetAlign() uint64

func (*Region) ID

func (r *Region) ID() uint

func (*Region) InterleaveWays

func (r *Region) InterleaveWays() uint64

func (*Region) Mappings

func (r *Region) Mappings() []ndctl.Mapping

func (*Region) MaxAvailableExtent

func (r *Region) MaxAvailableExtent() uint64

func (*Region) Readonly

func (r *Region) Readonly() bool

func (*Region) SeedNamespace

func (r *Region) SeedNamespace() ndctl.Namespace

func (*Region) Size

func (r *Region) Size() uint64

func (*Region) Type

func (r *Region) Type() ndctl.RegionType

func (*Region) TypeName

func (r *Region) TypeName() string

Jump to

Keyboard shortcuts

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