Documentation ¶
Index ¶
- Variables
- func Command(name string, args ...string) (string, int, error)
- func IsJsonHttpClientError(err error) bool
- func IsJsonHttpClientErrorWithResponseText(err error, containsText string) bool
- func RandomString(n int) string
- type ISCSIUtils
- func (u *ISCSIUtils) GenerateDeviceName(portalIP string, portalPort int, target string) (string, error)
- func (u *ISCSIUtils) GetHostNumber(target string, portalAddress string) (int, error)
- func (u *ISCSIUtils) GetISCSIPortalHostMapForTarget(targetIqn string) (map[string]int, error)
- func (u *ISCSIUtils) Login(portalIP string, portalPort int, target string) error
- func (u *ISCSIUtils) Logout(portalIP string, portalPort int, target string) error
- func (u *ISCSIUtils) ParseDeviceName(deviceName string) (string, int, string, error)
- func (u *ISCSIUtils) Rescan(target string) error
- func (u *ISCSIUtils) ScanLUN(hostNumber int, lunNumber int) error
- type JsonHttpClient
- func (c *JsonHttpClient) Delete(ctx context.Context, path string, input interface{}, output interface{}) error
- func (c *JsonHttpClient) Get(ctx context.Context, path string, input interface{}, output interface{}) error
- func (c *JsonHttpClient) Patch(ctx context.Context, path string, input interface{}, output interface{}) error
- func (c *JsonHttpClient) Post(ctx context.Context, path string, input interface{}, output interface{}) error
- func (c *JsonHttpClient) Put(ctx context.Context, path string, input interface{}, output interface{}) error
- type JsonHttpClientError
- type JsonHttpClientHttpClientConfigurationFn
- type JsonHttpClientOption
- type JsonHttpClientRequestTransformerFn
- type MountUtils
- func (u *MountUtils) ByteFilesystemStats(volumePath string) (totalBytes int64, usedBytes int64, availableBytes int64, err error)
- func (u *MountUtils) FormatAndMountDevice(device string, target string, fstype string) error
- func (u *MountUtils) GetDeviceNameFromMount(path string) (string, int, error)
- func (u *MountUtils) INodeFilesystemStats(volumePath string) (total int64, used int64, free int64, err error)
- func (u *MountUtils) ResizeDevice(device string, target string) error
- func (u *MountUtils) UnmountDevice(target string) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsJsonHttpClientError ¶
func RandomString ¶
Types ¶
type ISCSIUtils ¶
type ISCSIUtils struct {
// contains filtered or unexported fields
}
func NewISCSIUtils ¶
func NewISCSIUtils() *ISCSIUtils
func (*ISCSIUtils) GenerateDeviceName ¶
func (*ISCSIUtils) GetHostNumber ¶
func (u *ISCSIUtils) GetHostNumber(target string, portalAddress string) (int, error)
func (*ISCSIUtils) GetISCSIPortalHostMapForTarget ¶
func (u *ISCSIUtils) GetISCSIPortalHostMapForTarget(targetIqn string) (map[string]int, error)
https://github.com/kubernetes/kubernetes GetISCSIPortalHostMapForTarget given a target iqn, find all the scsi hosts logged into that target. Returns a map of iSCSI portals (string) to SCSI host numbers (integers).
For example: { "192.168.30.7:3260": 2, "192.168.30.8:3260": 3, }
func (*ISCSIUtils) Login ¶
func (u *ISCSIUtils) Login(portalIP string, portalPort int, target string) error
func (*ISCSIUtils) Logout ¶
func (u *ISCSIUtils) Logout(portalIP string, portalPort int, target string) error
func (*ISCSIUtils) ParseDeviceName ¶
func (*ISCSIUtils) Rescan ¶
func (u *ISCSIUtils) Rescan(target string) error
type JsonHttpClient ¶
type JsonHttpClient struct {
// contains filtered or unexported fields
}
func NewJsonHttpClient ¶
func NewJsonHttpClient(opts ...JsonHttpClientOption) *JsonHttpClient
func (*JsonHttpClient) Delete ¶
func (c *JsonHttpClient) Delete(ctx context.Context, path string, input interface{}, output interface{}) error
func (*JsonHttpClient) Get ¶
func (c *JsonHttpClient) Get(ctx context.Context, path string, input interface{}, output interface{}) error
func (*JsonHttpClient) Patch ¶
func (c *JsonHttpClient) Patch(ctx context.Context, path string, input interface{}, output interface{}) error
type JsonHttpClientError ¶
func NewJsonHttpClientError ¶
func NewJsonHttpClientError(message string, args ...interface{}) JsonHttpClientError
func NewJsonHttpClientRequestError ¶
func NewJsonHttpClientRequestError(statusCode int, responseBody string, message string, args ...interface{}) JsonHttpClientError
func (JsonHttpClientError) Error ¶
func (e JsonHttpClientError) Error() string
type JsonHttpClientOption ¶
type JsonHttpClientOption = func(*JsonHttpClient)
func WithHttpConfiguration ¶
func WithHttpConfiguration(fn JsonHttpClientHttpClientConfigurationFn) JsonHttpClientOption
func WithRequestTransformer ¶
func WithRequestTransformer(fn JsonHttpClientRequestTransformerFn) JsonHttpClientOption
type MountUtils ¶
type MountUtils struct {
// contains filtered or unexported fields
}
func NewMountUtils ¶
func NewMountUtils() *MountUtils
func (*MountUtils) ByteFilesystemStats ¶
func (*MountUtils) FormatAndMountDevice ¶
func (u *MountUtils) FormatAndMountDevice(device string, target string, fstype string) error
func (*MountUtils) GetDeviceNameFromMount ¶
func (u *MountUtils) GetDeviceNameFromMount(path string) (string, int, error)
func (*MountUtils) INodeFilesystemStats ¶
func (*MountUtils) ResizeDevice ¶
func (u *MountUtils) ResizeDevice(device string, target string) error
func (*MountUtils) UnmountDevice ¶
func (u *MountUtils) UnmountDevice(target string) error
Click to show internal directories.
Click to hide internal directories.