Documentation ¶
Overview ¶
Package host defines a set of useful methods, which can help Connector to operate host information
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveNodeHostInfoToSecret ¶
SaveNodeHostInfoToSecret save the current node host information to secret. secret namespace use the namespace of the current pod.
Types ¶
type NodeHostInfo ¶
type NodeHostInfo struct { // HostName the name of host HostName string `json:"hostName"` // IscsiInitiator the initiator of ISCSI protocol IscsiInitiator string `json:"iscsiInitiator"` // FCInitiators the initiator of FC protocol FCInitiators []string `json:"fCInitiators"` // RoCEInitiator the initiator of RoCE protocol RoCEInitiator string `json:"roCEInitiator"` }
NodeHostInfo defines the base information of node host
func GetNodeHostInfosFromSecret ¶
func GetNodeHostInfosFromSecret(ctx context.Context, hostName string) (*NodeHostInfo, error)
GetNodeHostInfosFromSecret get the specified node host information from secret.
func NewNodeHostInfo ¶
func NewNodeHostInfo(ctx context.Context) (*NodeHostInfo, error)
NewNodeHostInfo instantiates this node host info. If the initiator query fails, the error will not be returned directly, because the current host may not have an initiator, which should be judged by the caller and handled accordingly
Click to show internal directories.
Click to hide internal directories.