Documentation ¶
Overview ¶
Package spdk implements the spdk json-rpc protocol
Package spdk implements the spdk json-rpc protocol ¶
Package spdk implements the spdk json-rpc protocol ¶
Package spdk implements the spdk json-rpc protocol ¶
Package spdk implements the spdk json-rpc protocol ¶
Package spdk implements the spdk json-rpc protocol ¶
Package spdk implements the spdk json-rpc protocol ¶
Package spdk implements the spdk json-rpc protocol
Index ¶
- Constants
- Variables
- type AccelCryptoKeyCreateParams
- type AccelCryptoKeyCreateResult
- type AccelCryptoKeyDestroyParams
- type AccelCryptoKeyDestroyResult
- type AccelCryptoKeyGetParams
- type AccelCryptoKeyGetResult
- type AccelService
- type AccelServiceImpl
- func (p *AccelServiceImpl) CryptoKeyCreate(ctx context.Context, name string, cipher string, key []byte) (*AccelCryptoKeyCreateResult, error)
- func (p *AccelServiceImpl) CryptoKeyDestroy(_ context.Context, _ *AccelCryptoKeyDestroyParams) (*AccelCryptoKeyDestroyResult, error)
- func (p *AccelServiceImpl) CryptoKeyList(_ context.Context, _ *AccelCryptoKeyGetParams) (*AccelCryptoKeyGetResult, error)
- func (p *AccelServiceImpl) GetStats(_ context.Context, _ *NvmfCreateSubsystemParams) (*NvmfCreateSubsystemResult, error)
- type BdevAioCreateParams
- type BdevAioCreateResult
- type BdevAioDeleteParams
- type BdevAioDeleteResult
- type BdevCryptoCreateParams
- type BdevCryptoCreateResult
- type BdevCryptoDeleteParams
- type BdevCryptoDeleteResult
- type BdevGetBdevsParams
- type BdevGetBdevsResult
- type BdevGetIostatParams
- type BdevGetIostatResult
- type BdevMallocCreateParams
- type BdevMallocCreateResult
- type BdevMallocDeleteParams
- type BdevMallocDeleteResult
- type BdevNullCreateParams
- type BdevNullCreateResult
- type BdevNullDeleteParams
- type BdevNullDeleteResult
- type BdevNvmeAttachControllerParams
- type BdevNvmeAttachControllerResult
- type BdevNvmeDetachControllerParams
- type BdevNvmeDetachControllerResult
- type BdevNvmeGetControllerParams
- type BdevNvmeGetControllerResult
- type BdevQoSParams
- type BdevQoSResult
- type Client
- type GetVersionResult
- type JSONRPC
- type LvolService
- type NvmfCreateSubsystemParams
- type NvmfCreateSubsystemResult
- type NvmfDeleteSubsystemParams
- type NvmfDeleteSubsystemResult
- type NvmfGetSubsystemStatsResult
- type NvmfGetSubsystemsResult
- type NvmfService
- type NvmfServiceImpl
- func (p *NvmfServiceImpl) AddListener(context.Context, *NvmfSubsystemAddListenerParams) (*NvmfSubsystemAddListenerResult, error)
- func (p *NvmfServiceImpl) AddNamespace(context.Context, *NvmfSubsystemAddNsParams) (*NvmfSubsystemAddNsResult, error)
- func (p *NvmfServiceImpl) CreateSubsystem(ctx context.Context, nqn string, serial string, model string, ns int) (*NvmfCreateSubsystemResult, error)
- func (p *NvmfServiceImpl) DeleteSubsystem(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error)
- func (p *NvmfServiceImpl) GetStats(_ context.Context, _ int, _ int) (*NvmfGetSubsystemStatsResult, error)
- func (p *NvmfServiceImpl) GetSubsystems(_ context.Context, _ int, _ int) (*NvmfGetSubsystemsResult, error)
- func (p *NvmfServiceImpl) RemoveListener(context.Context, *NvmfSubsystemAddListenerParams) (*NvmfSubsystemAddListenerResult, error)
- func (p *NvmfServiceImpl) RemoveNamespace(context.Context, *NvmfSubsystemRemoveNsParams) (*NvmfSubsystemRemoveNsResult, error)
- type NvmfSubsystemAddHostParams
- type NvmfSubsystemAddHostResult
- type NvmfSubsystemAddListenerParams
- type NvmfSubsystemAddListenerResult
- type NvmfSubsystemAddNsParams
- type NvmfSubsystemAddNsResult
- type NvmfSubsystemRemoveNsParams
- type NvmfSubsystemRemoveNsResult
- type RPCError
- type RPCRequest
- type RPCResponse
- type VhostCreateBlkControllerParams
- type VhostCreateBlkControllerResult
- type VhostCreateScsiControllerParams
- type VhostCreateScsiControllerResult
- type VhostDeleteControllerParams
- type VhostDeleteControllerResult
- type VhostGetControllersParams
- type VhostGetControllersResult
Constants ¶
const ( // TweakModeSimpleLba represents tweak as // Tweak[127:0] = {64'b0, LBA[63:0]} // It is the default tweak mode if not specified TweakModeSimpleLba = "SIMPLE_LBA" // TweakModeJoinNegLbaWithLba represents tweak as // Tweak[127:0] = {1’b0, ~LBA[62:0], LBA[63:0]} TweakModeJoinNegLbaWithLba = "JOIN_NEG_LBA_WITH_LBA" // TweakModeIncr512FullLba represents tweak as // Tweak[127:0] = {lba[127:0]} TweakModeIncr512FullLba = "INCR_512_FULL_LBA" // TweakModeIncr512UpperLba represents tweak as // Tweak[127:0] = {lba[63:0], 64'b0} TweakModeIncr512UpperLba = "INCR_512_UPPER_LBA" )
const JSONRPCVersion = "2.0"
JSONRPCVersion holds the current version of json RPC protocol
Variables ¶
var ( // ErrFailedSpdkCall indicates that the bridge failed to execute SPDK call ErrFailedSpdkCall = status.Error(codes.Unknown, "Failed to execute SPDK call") // ErrUnexpectedSpdkCallResult indicates that the bridge got an error from SPDK ErrUnexpectedSpdkCallResult = status.Error(codes.FailedPrecondition, "Unexpected SPDK call result.") )
Functions ¶
This section is empty.
Types ¶
type AccelCryptoKeyCreateParams ¶
type AccelCryptoKeyCreateParams struct { Cipher string `json:"cipher"` Key string `json:"key"` Key2 string `json:"key2"` TweakMode string `json:"tweak_mode,omitempty"` Name string `json:"name"` }
AccelCryptoKeyCreateParams holds the parameters required to create a Crypto Key
type AccelCryptoKeyCreateResult ¶
type AccelCryptoKeyCreateResult bool
AccelCryptoKeyCreateResult is the result of creating a Crypto Key
type AccelCryptoKeyDestroyParams ¶
type AccelCryptoKeyDestroyParams struct {
KeyName string `json:"key_name"`
}
AccelCryptoKeyDestroyParams holds the parameters required to delete a Crypto Key
type AccelCryptoKeyDestroyResult ¶
type AccelCryptoKeyDestroyResult bool
AccelCryptoKeyDestroyResult is the result of deleting a Crypto Key
type AccelCryptoKeyGetParams ¶
type AccelCryptoKeyGetParams struct {
KeyName string `json:"key_name"`
}
AccelCryptoKeyGetParams holds the parameters required to get a Crypto Key
type AccelCryptoKeyGetResult ¶
type AccelCryptoKeyGetResult struct { Name string `json:"name"` Cipher string `json:"cipher"` Key string `json:"key"` Key2 string `json:"key2"` }
AccelCryptoKeyGetResult is the result of getting a Crypto Key
type AccelService ¶
type AccelService interface { CryptoKeyCreate(ctx context.Context, name string, cipher string, key []byte) (*AccelCryptoKeyCreateResult, error) CryptoKeyDestroy(context.Context, *AccelCryptoKeyDestroyParams) (*AccelCryptoKeyDestroyResult, error) CryptoKeyList(context.Context, *AccelCryptoKeyGetParams) (*AccelCryptoKeyGetResult, error) GetStats(context.Context, *NvmfCreateSubsystemParams) (*NvmfCreateSubsystemResult, error) }
AccelService is interface to all acceleration functions in spdk
type AccelServiceImpl ¶
type AccelServiceImpl struct {
// contains filtered or unexported fields
}
AccelServiceImpl implements AccelService interface
func NewAccelService ¶
func NewAccelService() *AccelServiceImpl
NewAccelService is a constructor for AccelServiceImpl
func (*AccelServiceImpl) CryptoKeyCreate ¶
func (p *AccelServiceImpl) CryptoKeyCreate(ctx context.Context, name string, cipher string, key []byte) (*AccelCryptoKeyCreateResult, error)
CryptoKeyCreate creates crypto key
func (*AccelServiceImpl) CryptoKeyDestroy ¶
func (p *AccelServiceImpl) CryptoKeyDestroy(_ context.Context, _ *AccelCryptoKeyDestroyParams) (*AccelCryptoKeyDestroyResult, error)
CryptoKeyDestroy destroys crypto key
func (*AccelServiceImpl) CryptoKeyList ¶
func (p *AccelServiceImpl) CryptoKeyList(_ context.Context, _ *AccelCryptoKeyGetParams) (*AccelCryptoKeyGetResult, error)
CryptoKeyList lists crypto keys
func (*AccelServiceImpl) GetStats ¶
func (p *AccelServiceImpl) GetStats(_ context.Context, _ *NvmfCreateSubsystemParams) (*NvmfCreateSubsystemResult, error)
GetStats gets crypto key stats
type BdevAioCreateParams ¶
type BdevAioCreateParams struct { Name string `json:"name"` Filename string `json:"filename"` BlockSize int `json:"block_size"` }
BdevAioCreateParams holds the parameters required to create an AIO Block Device
type BdevAioCreateResult ¶
type BdevAioCreateResult string
BdevAioCreateResult is the result of creating an AIO Block Device
type BdevAioDeleteParams ¶
type BdevAioDeleteParams struct {
Name string `json:"name"`
}
BdevAioDeleteParams holds the parameters required to delete an AIO Block Device
type BdevAioDeleteResult ¶
type BdevAioDeleteResult bool
BdevAioDeleteResult is the result of deleting an AIO Block Device
type BdevCryptoCreateParams ¶
type BdevCryptoCreateParams struct { BaseBdevName string `json:"base_bdev_name"` Name string `json:"name"` KeyName string `json:"key_name"` }
BdevCryptoCreateParams holds the parameters required to create a Crypto Block Device
type BdevCryptoCreateResult ¶
type BdevCryptoCreateResult string
BdevCryptoCreateResult is the result of creating a Crypto Block Device
type BdevCryptoDeleteParams ¶
type BdevCryptoDeleteParams struct {
Name string `json:"name"`
}
BdevCryptoDeleteParams holds the parameters required to delete a Crypto Block Device
type BdevCryptoDeleteResult ¶
type BdevCryptoDeleteResult bool
BdevCryptoDeleteResult is the result of deleting a Crypto Block Device
type BdevGetBdevsParams ¶
type BdevGetBdevsParams struct {
Name string `json:"name"`
}
BdevGetBdevsParams is the parameters required to get a block device
type BdevGetBdevsResult ¶
type BdevGetBdevsResult struct { Name string `json:"name"` BlockSize int64 `json:"block_size"` NumBlocks int64 `json:"num_blocks"` UUID string `json:"uuid"` }
BdevGetBdevsResult is the result of getting a block device
type BdevGetIostatParams ¶
type BdevGetIostatParams struct {
Name string `json:"name"`
}
BdevGetIostatParams hold the parameters required to get the IO stats of a block device
type BdevGetIostatResult ¶
type BdevGetIostatResult struct { TickRate int `json:"tick_rate"` Ticks int64 `json:"ticks"` Bdevs []struct { Name string `json:"name"` BytesRead int `json:"bytes_read"` NumReadOps int `json:"num_read_ops"` BytesWritten int `json:"bytes_written"` NumWriteOps int `json:"num_write_ops"` BytesUnmapped int `json:"bytes_unmapped"` NumUnmapOps int `json:"num_unmap_ops"` ReadLatencyTicks int `json:"read_latency_ticks"` WriteLatencyTicks int `json:"write_latency_ticks"` UnmapLatencyTicks int `json:"unmap_latency_ticks"` } `json:"bdevs"` }
BdevGetIostatResult hold the results of getting the IO stats of a block device
type BdevMallocCreateParams ¶
type BdevMallocCreateParams struct { NumBlocks int `json:"num_blocks"` BlockSize int `json:"block_size"` MdSize int `json:"md_size,omitempty"` MdInterleave bool `json:"md_interleave,omitempty"` Name string `json:"name"` UUID string `json:"uuid,omitempty"` }
BdevMallocCreateParams holds the parameters required to create a Malloc Block Device
type BdevMallocCreateResult ¶
type BdevMallocCreateResult string
BdevMallocCreateResult is the result of creating a Malloc Block Device
type BdevMallocDeleteParams ¶
type BdevMallocDeleteParams struct {
Name string `json:"name"`
}
BdevMallocDeleteParams holds the parameters required to delete a Malloc Block Device
type BdevMallocDeleteResult ¶
type BdevMallocDeleteResult bool
BdevMallocDeleteResult is the result of deleting a Malloc Block Device
type BdevNullCreateParams ¶
type BdevNullCreateParams struct { BlockSize int `json:"block_size"` NumBlocks int `json:"num_blocks"` Name string `json:"name"` }
BdevNullCreateParams holds the parameters required to create a Null Block Device that discards all writes and returns undefined data for reads
type BdevNullCreateResult ¶
type BdevNullCreateResult string
BdevNullCreateResult is the result of creating a Null Block Device
type BdevNullDeleteParams ¶
type BdevNullDeleteParams struct {
Name string `json:"name"`
}
BdevNullDeleteParams holds the parameters required to delete a Null Block Device
type BdevNullDeleteResult ¶
type BdevNullDeleteResult bool
BdevNullDeleteResult is the result of deleting a Null Block Device
type BdevNvmeAttachControllerParams ¶
type BdevNvmeAttachControllerParams struct { Name string `json:"name"` Trtype string `json:"trtype"` Traddr string `json:"traddr"` Hostnqn string `json:"hostnqn,omitempty"` Adrfam string `json:"adrfam,omitempty"` Trsvcid string `json:"trsvcid,omitempty"` Subnqn string `json:"subnqn,omitempty"` Hdgst bool `json:"hdgst,omitempty"` Ddgst bool `json:"ddgst,omitempty"` Psk string `json:"psk,omitempty"` Multipath string `json:"multipath,omitempty"` }
BdevNvmeAttachControllerParams is the parameters required to create a block device based on an NVMe device
type BdevNvmeAttachControllerResult ¶
type BdevNvmeAttachControllerResult string
BdevNvmeAttachControllerResult is the result of creating a block device based on an NVMe device
type BdevNvmeDetachControllerParams ¶
type BdevNvmeDetachControllerParams struct { Name string `json:"name"` Trtype string `json:"trtype"` Traddr string `json:"traddr"` Adrfam string `json:"adrfam,omitempty"` Trsvcid string `json:"trsvcid,omitempty"` Subnqn string `json:"subnqn,omitempty"` }
BdevNvmeDetachControllerParams is the parameters required to detach a block device based on an NVMe device
type BdevNvmeDetachControllerResult ¶
type BdevNvmeDetachControllerResult bool
BdevNvmeDetachControllerResult is the result of detaching a block device based on an NVMe device
type BdevNvmeGetControllerParams ¶
type BdevNvmeGetControllerParams struct {
Name string `json:"name"`
}
BdevNvmeGetControllerParams is the parameters required to get a block device based on an NVMe device
type BdevNvmeGetControllerResult ¶
type BdevNvmeGetControllerResult struct { Name string `json:"name"` Ctrlrs []struct { State string `json:"state"` Trid struct { Trtype string `json:"trtype"` Adrfam string `json:"adrfam"` Traddr string `json:"traddr"` Trsvcid string `json:"trsvcid"` Subnqn string `json:"subnqn"` } `json:"trid"` Cntlid int `json:"cntlid"` Host struct { Nqn string `json:"nqn"` Addr string `json:"addr"` Svcid string `json:"svcid"` } `json:"host"` } `json:"ctrlrs"` }
BdevNvmeGetControllerResult is the result of getting a block device based on an NVMe device
type BdevQoSParams ¶
type BdevQoSParams struct { Name string `json:"name"` RwIosPerSec int `json:"rw_ios_per_sec"` RwMbytesPerSec int `json:"rw_mbytes_per_sec"` RMbytesPerSec int `json:"r_mbytes_per_sec"` WMbytesPerSec int `json:"w_mbytes_per_sec"` }
BdevQoSParams holds the parameters required to set QoS on a Block Device
type BdevQoSResult ¶
type BdevQoSResult bool
BdevQoSResult is the result of setting QoS on a Block Device
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements JSONRPC interface
func NewClient ¶
NewClient creates a new instance of JSONRPC which is capable to interact with either unix domain socket, e.g.: /var/tmp/spdk.sock or with tcp connection ip and port tuple, e.g.: 10.1.1.2:1234
func (*Client) GetVersion ¶
GetVersion implements low level rpc request/response handling
func (*Client) StartUnixListener ¶
StartUnixListener is utility function used to create new listener in tests
type GetVersionResult ¶
type GetVersionResult struct { Version string `json:"version"` Fields struct { Major int `json:"major"` Minor int `json:"minor"` Patch int `json:"patch"` Suffix string `json:"suffix"` } `json:"fields"` }
GetVersionResult is the result of getting a version
type JSONRPC ¶
type JSONRPC interface { GetID() uint64 GetVersion(context.Context) string StartUnixListener() net.Listener Call(ctx context.Context, method string, args, result interface{}) error }
JSONRPC represents an interface to execute JSON RPC to SPDK
type LvolService ¶
type LvolService interface { CreateLvstore(context.Context, *NvmfCreateSubsystemParams) (*NvmfCreateSubsystemResult, error) DeleteLvstore(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error) GetLvstores(ctx context.Context, page int, limit int) (*NvmfGetSubsystemsResult, error) RenameLvstore(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error) GrowLvstore(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error) CreateLvol(context.Context, *NvmfCreateSubsystemParams) (*NvmfCreateSubsystemResult, error) SnapshotLvol(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error) CloneLvol(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error) RenameLvol(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error) ResizeLvol(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error) DeleteLvol(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error) }
LvolService is interface to all logical volumes functions in spdk
type NvmfCreateSubsystemParams ¶
type NvmfCreateSubsystemParams struct { Nqn string `json:"nqn"` SerialNumber string `json:"serial_number"` ModelNumber string `json:"model_number"` AllowAnyHost bool `json:"allow_any_host"` MaxNamespaces int `json:"max_namespaces"` }
NvmfCreateSubsystemParams holds the parameters required to create a NVMf subsystem
type NvmfCreateSubsystemResult ¶
type NvmfCreateSubsystemResult bool
NvmfCreateSubsystemResult is the result of creating a NVMf subsystem
type NvmfDeleteSubsystemParams ¶
type NvmfDeleteSubsystemParams struct {
Nqn string `json:"nqn"`
}
NvmfDeleteSubsystemParams holds the parameters required to Delete a NVMf subsystem
type NvmfDeleteSubsystemResult ¶
type NvmfDeleteSubsystemResult bool
NvmfDeleteSubsystemResult is the result of creating a NVMf subsystem
type NvmfGetSubsystemStatsResult ¶
type NvmfGetSubsystemStatsResult struct { TickRate int `json:"tick_rate"` PollGroups []struct { Name string `json:"name"` AdminQpairs int `json:"admin_qpairs"` IoQpairs int `json:"io_qpairs"` CurrentAdminQpairs int `json:"current_admin_qpairs"` CurrentIoQpairs int `json:"current_io_qpairs"` PendingBdevIo int `json:"pending_bdev_io"` Transports []struct { Trtype string `json:"trtype"` } `json:"transports"` } `json:"poll_groups"` }
NvmfGetSubsystemStatsResult is the result of NVMf subsystem statistics
type NvmfGetSubsystemsResult ¶
type NvmfGetSubsystemsResult struct { Nqn string `json:"nqn"` Subtype string `json:"subtype"` ListenAddresses []interface{} `json:"listen_addresses"` AllowAnyHost bool `json:"allow_any_host"` Hosts []interface{} `json:"hosts"` SerialNumber string `json:"serial_number,omitempty"` ModelNumber string `json:"model_number,omitempty"` MaxNamespaces int `json:"max_namespaces,omitempty"` MinCntlid int `json:"min_cntlid,omitempty"` MaxCntlid int `json:"max_cntlid,omitempty"` Namespaces []struct { Nsid int `json:"nsid"` Name string `json:"name"` } `json:"namespaces,omitempty"` }
NvmfGetSubsystemsResult is the result of listing all NVMf subsystems
type NvmfService ¶
type NvmfService interface { CreateSubsystem(ctx context.Context, nqn string, serial string, model string, ns int) (*NvmfCreateSubsystemResult, error) DeleteSubsystem(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error) GetSubsystems(ctx context.Context, page int, limit int) (*NvmfGetSubsystemsResult, error) GetStats(ctx context.Context, page int, limit int) (*NvmfGetSubsystemStatsResult, error) AddListener(context.Context, *NvmfSubsystemAddListenerParams) (*NvmfSubsystemAddListenerResult, error) RemoveListener(context.Context, *NvmfSubsystemAddListenerParams) (*NvmfSubsystemAddListenerResult, error) AddNamespace(context.Context, *NvmfSubsystemAddNsParams) (*NvmfSubsystemAddNsResult, error) RemoveNamespace(context.Context, *NvmfSubsystemRemoveNsParams) (*NvmfSubsystemRemoveNsResult, error) }
NvmfService is interface to all nvme over fabric functions in spdk
type NvmfServiceImpl ¶
type NvmfServiceImpl struct {
// contains filtered or unexported fields
}
NvmfServiceImpl implements NvmfService interface
func NewNvmfService ¶
func NewNvmfService() *NvmfServiceImpl
NewNvmfService is a constructor for NvmfServiceImpl
func (*NvmfServiceImpl) AddListener ¶
func (p *NvmfServiceImpl) AddListener(context.Context, *NvmfSubsystemAddListenerParams) (*NvmfSubsystemAddListenerResult, error)
AddListener adds nvme listener
func (*NvmfServiceImpl) AddNamespace ¶
func (p *NvmfServiceImpl) AddNamespace(context.Context, *NvmfSubsystemAddNsParams) (*NvmfSubsystemAddNsResult, error)
AddNamespace adds nvme namespace
func (*NvmfServiceImpl) CreateSubsystem ¶
func (p *NvmfServiceImpl) CreateSubsystem(ctx context.Context, nqn string, serial string, model string, ns int) (*NvmfCreateSubsystemResult, error)
CreateSubsystem creates nvme subsystem
func (*NvmfServiceImpl) DeleteSubsystem ¶
func (p *NvmfServiceImpl) DeleteSubsystem(context.Context, *NvmfDeleteSubsystemParams) (*NvmfDeleteSubsystemResult, error)
DeleteSubsystem deletes nvme subsystem
func (*NvmfServiceImpl) GetStats ¶
func (p *NvmfServiceImpl) GetStats(_ context.Context, _ int, _ int) (*NvmfGetSubsystemStatsResult, error)
GetStats gets nvme subsystem stats
func (*NvmfServiceImpl) GetSubsystems ¶
func (p *NvmfServiceImpl) GetSubsystems(_ context.Context, _ int, _ int) (*NvmfGetSubsystemsResult, error)
GetSubsystems gets nvme subsystem
func (*NvmfServiceImpl) RemoveListener ¶
func (p *NvmfServiceImpl) RemoveListener(context.Context, *NvmfSubsystemAddListenerParams) (*NvmfSubsystemAddListenerResult, error)
RemoveListener removes nvme listener
func (*NvmfServiceImpl) RemoveNamespace ¶
func (p *NvmfServiceImpl) RemoveNamespace(context.Context, *NvmfSubsystemRemoveNsParams) (*NvmfSubsystemRemoveNsResult, error)
RemoveNamespace removes nvme namespace
type NvmfSubsystemAddHostParams ¶
type NvmfSubsystemAddHostParams struct { Nqn string `json:"nqn"` Host string `json:"host"` TgtName string `json:"tgt_name,omitempty"` Psk string `json:"psk,omitempty"` }
NvmfSubsystemAddHostParams holds the parameters required to add a host to NVMf subsystem
type NvmfSubsystemAddHostResult ¶
type NvmfSubsystemAddHostResult bool
NvmfSubsystemAddHostResult is the result of adding host to NVMf subsystem
type NvmfSubsystemAddListenerParams ¶
type NvmfSubsystemAddListenerParams struct { Nqn string `json:"nqn"` SecureChannel bool `json:"secure_channel,omitempty"` ListenAddress struct { Trtype string `json:"trtype"` Traddr string `json:"traddr"` Trsvcid string `json:"trsvcid,omitempty"` Adrfam string `json:"adrfam,omitempty"` } `json:"listen_address"` }
NvmfSubsystemAddListenerParams holds the parameters required to Delete a NVMf subsystem
type NvmfSubsystemAddListenerResult ¶
type NvmfSubsystemAddListenerResult bool
NvmfSubsystemAddListenerResult is the result of creating a NVMf subsystem
type NvmfSubsystemAddNsParams ¶
type NvmfSubsystemAddNsParams struct { Nqn string `json:"nqn"` Namespace struct { Nsid int `json:"nsid"` BdevName string `json:"bdev_name"` } `json:"namespace"` }
NvmfSubsystemAddNsParams holds the parameters required to add a namespace to an existing subsystem
type NvmfSubsystemAddNsResult ¶
type NvmfSubsystemAddNsResult int
NvmfSubsystemAddNsResult is the result NSID of attaching a namespace to an existing subsystem
type NvmfSubsystemRemoveNsParams ¶
NvmfSubsystemRemoveNsParams holds the parameters required to Delete a NVMf subsystem
type NvmfSubsystemRemoveNsResult ¶
type NvmfSubsystemRemoveNsResult bool
NvmfSubsystemRemoveNsResult is the result of creating a NVMf subsystem
type RPCRequest ¶
type RPCRequest struct { RPCVersion string `json:"jsonrpc"` Method string `json:"method"` ID uint64 `json:"id"` Params interface{} `json:"params,omitempty"` }
RPCRequest holds the parameters required to request struct
type RPCResponse ¶
type RPCResponse struct { JSONRPCVersion string `json:"jsonrpc"` ID uint64 `json:"id"` Result json.RawMessage `json:"result"` Error RPCError `json:"error"` }
RPCResponse holds the parameters of the response struct
type VhostCreateBlkControllerParams ¶
type VhostCreateBlkControllerParams struct { Ctrlr string `json:"ctrlr"` DevName string `json:"dev_name"` }
VhostCreateBlkControllerParams holds the parameters required to create a block device from a vhost controller
type VhostCreateBlkControllerResult ¶
type VhostCreateBlkControllerResult bool
VhostCreateBlkControllerResult is the result of creating a block device from a vhost controller
type VhostCreateScsiControllerParams ¶
type VhostCreateScsiControllerParams struct {
Ctrlr string `json:"ctrlr"`
}
VhostCreateScsiControllerParams holds the parameters required to create a SCSI controller
type VhostCreateScsiControllerResult ¶
type VhostCreateScsiControllerResult bool
VhostCreateScsiControllerResult is the result of creating a SCSI controller
type VhostDeleteControllerParams ¶
type VhostDeleteControllerParams struct {
Ctrlr string `json:"ctrlr"`
}
VhostDeleteControllerParams holds the parameters required to delete a vhost controller
type VhostDeleteControllerResult ¶
type VhostDeleteControllerResult bool
VhostDeleteControllerResult is the result of deleting a vhost controller
type VhostGetControllersParams ¶
type VhostGetControllersParams struct {
Name string `json:"name"`
}
VhostGetControllersParams holds the parameters required to get a vhost controller
type VhostGetControllersResult ¶
type VhostGetControllersResult struct { Ctrlr string `json:"ctrlr"` Cpumask string `json:"cpumask"` DelayBaseUs int `json:"delay_base_us"` IopsThreshold int `json:"iops_threshold"` Socket string `json:"socket"` BackendSpecific struct { Block struct { Readonly bool `json:"readonly"` Bdev string `json:"bdev"` } `json:"block"` } `json:"backend_specific"` }
VhostGetControllersResult is the result of getting a vhost controller