Documentation ¶
Index ¶
- func Command(name string, arg []string) (string, error)
- func ConcatStrings(ss ...string) string
- func GetCurPath() string
- func GetHostname() string
- func GetLocalIP(hostName string) (string, error)
- func GetResourceID(namespace, name string) string
- func SpliceErrors(errors []error) string
- func ValidateNodeIP(nodeIP net.IP) error
- type DummyDeviceManager
- func (d *DummyDeviceManager) DeleteDummyDevice(devName string) error
- func (d *DummyDeviceManager) EnsureAddressBind(address, devName string) (bool, error)
- func (d *DummyDeviceManager) EnsureDummyDevice(devName string) (bool, error)
- func (d *DummyDeviceManager) ListBindAddress(devName string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConcatStrings ¶ added in v1.9.0
ConcatStrings use bytes.buffer to concatenate string variable
func GetHostname ¶ added in v1.8.0
func GetHostname() string
GetHostname returns a reasonable hostname
func GetLocalIP ¶
func GetResourceID ¶ added in v1.16.0
GetResourceID return resource ID
func SpliceErrors ¶ added in v1.3.0
func ValidateNodeIP ¶
ValidateNodeIP validates given node IP belongs to the current host
Types ¶
type DummyDeviceManager ¶ added in v1.17.0
func NewDummyDeviceManager ¶ added in v1.17.0
func NewDummyDeviceManager() *DummyDeviceManager
func (*DummyDeviceManager) DeleteDummyDevice ¶ added in v1.17.0
func (d *DummyDeviceManager) DeleteDummyDevice(devName string) error
DeleteDummyDevice delete dummy device.
func (*DummyDeviceManager) EnsureAddressBind ¶ added in v1.17.0
func (d *DummyDeviceManager) EnsureAddressBind(address, devName string) (bool, error)
EnsureAddressBind checks if address is bound to the interface, if not, binds it. If the address is already bound, return true.
func (*DummyDeviceManager) EnsureDummyDevice ¶ added in v1.17.0
func (d *DummyDeviceManager) EnsureDummyDevice(devName string) (bool, error)
EnsureDummyDevice ensure dummy device exist
func (*DummyDeviceManager) ListBindAddress ¶ added in v1.17.0
func (d *DummyDeviceManager) ListBindAddress(devName string) ([]string, error)
ListBindAddress list all IP addresses which are bound in a given interface
Click to show internal directories.
Click to hide internal directories.