Documentation
¶
Overview ¶
Package client provides an http client for interacting with the Hammerspace API
Index ¶
- Constants
- type HammerspaceClient
- func (client *HammerspaceClient) CheckIfShareCreateTaskIsRunning(ctx context.Context, shareName string) (bool, error)
- func (client *HammerspaceClient) CreateShare(ctx context.Context, name string, exportPath string, size int64, ...) error
- func (client *HammerspaceClient) CreateShareFromSnapshot(ctx context.Context, name string, exportPath string, size int64, ...) error
- func (client *HammerspaceClient) DeleteFileSnapshot(ctx context.Context, filePath, snapshotName string) error
- func (client *HammerspaceClient) DeleteShare(ctx context.Context, name string, deleteDelay int64) error
- func (client *HammerspaceClient) DeleteShareSnapshot(ctx context.Context, shareName, snapshotName string) error
- func (client *HammerspaceClient) DoesFileExist(ctx context.Context, path string) (bool, error)
- func (client *HammerspaceClient) EnsureLogin() error
- func (client *HammerspaceClient) GetAnvilPortal() (string, error)
- func (client *HammerspaceClient) GetClusterAvailableCapacity(ctx context.Context) (int64, error)
- func (client *HammerspaceClient) GetDataPortals(ctx context.Context, nodeID string) ([]common.DataPortal, error)
- func (client *HammerspaceClient) GetFile(ctx context.Context, path string) (*common.File, error)
- func (client *HammerspaceClient) GetFileSnapshots(ctx context.Context, filePath string) ([]common.FileSnapshot, error)
- func (client *HammerspaceClient) GetPortalFloatingIp(ctx context.Context) (string, error)
- func (client *HammerspaceClient) GetShare(ctx context.Context, name string) (*common.ShareResponse, error)
- func (client *HammerspaceClient) GetShareRawFields(ctx context.Context, name string) (map[string]interface{}, error)
- func (client *HammerspaceClient) GetShareSnapshots(ctx context.Context, shareName string) ([]string, error)
- func (client *HammerspaceClient) ListObjectiveNames(ctx context.Context) ([]string, error)
- func (client *HammerspaceClient) ListObjectives(ctx context.Context) ([]common.ClusterObjectiveResponse, error)
- func (client *HammerspaceClient) ListShares(ctx context.Context) ([]common.ShareResponse, error)
- func (client *HammerspaceClient) ListSnapshots(ctx context.Context, snapshot_id, volume_id string) ([]common.SnapshotResponse, error)
- func (client *HammerspaceClient) ListVolumes(ctx context.Context) ([]common.VolumeResponse, error)
- func (client *HammerspaceClient) RestoreFileSnapToDestination(ctx context.Context, snapshotPath, filePath string) error
- func (client *HammerspaceClient) SetObjectives(ctx context.Context, shareName string, path string, objectives []string, ...) error
- func (client *HammerspaceClient) SnapshotFile(ctx context.Context, filepath string) (string, error)
- func (client *HammerspaceClient) SnapshotShare(ctx context.Context, shareName string) (string, error)
- func (client *HammerspaceClient) UpdateShareSize(ctx context.Context, name string, size int64) error
- func (client *HammerspaceClient) WaitForTaskCompletion(ctx context.Context, taskLocation string) (bool, error)
Constants ¶
View Source
const (
BasePath = "/mgmt/v1.2/rest"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HammerspaceClient ¶
type HammerspaceClient struct {
// contains filtered or unexported fields
}
func NewHammerspaceClient ¶
func NewHammerspaceClient(endpoint, username, password string, tlsVerify bool) (*HammerspaceClient, error)
func (*HammerspaceClient) CheckIfShareCreateTaskIsRunning ¶
func (*HammerspaceClient) CreateShare ¶
func (*HammerspaceClient) CreateShareFromSnapshot ¶
func (*HammerspaceClient) DeleteFileSnapshot ¶
func (client *HammerspaceClient) DeleteFileSnapshot(ctx context.Context, filePath, snapshotName string) error
func (*HammerspaceClient) DeleteShare ¶
func (*HammerspaceClient) DeleteShareSnapshot ¶
func (client *HammerspaceClient) DeleteShareSnapshot(ctx context.Context, shareName, snapshotName string) error
func (*HammerspaceClient) DoesFileExist ¶
func (*HammerspaceClient) EnsureLogin ¶
func (client *HammerspaceClient) EnsureLogin() error
Logs into Hammerspace Anvil Server
func (*HammerspaceClient) GetAnvilPortal ¶
func (client *HammerspaceClient) GetAnvilPortal() (string, error)
GetAnvilPortal returns the hostname of the configured Hammerspace API gateway
func (*HammerspaceClient) GetClusterAvailableCapacity ¶
func (client *HammerspaceClient) GetClusterAvailableCapacity(ctx context.Context) (int64, error)
func (*HammerspaceClient) GetDataPortals ¶
func (client *HammerspaceClient) GetDataPortals(ctx context.Context, nodeID string) ([]common.DataPortal, error)
GetDataPortals returns a list of operational data-portals those with a matching nodeID are put at the top of the list
func (*HammerspaceClient) GetFileSnapshots ¶
func (client *HammerspaceClient) GetFileSnapshots(ctx context.Context, filePath string) ([]common.FileSnapshot, error)
func (*HammerspaceClient) GetPortalFloatingIp ¶
func (client *HammerspaceClient) GetPortalFloatingIp(ctx context.Context) (string, error)
Return a string with a floating data portal IP
func (*HammerspaceClient) GetShare ¶
func (client *HammerspaceClient) GetShare(ctx context.Context, name string) (*common.ShareResponse, error)
func (*HammerspaceClient) GetShareRawFields ¶
func (*HammerspaceClient) GetShareSnapshots ¶
func (*HammerspaceClient) ListObjectiveNames ¶
func (client *HammerspaceClient) ListObjectiveNames(ctx context.Context) ([]string, error)
func (*HammerspaceClient) ListObjectives ¶
func (client *HammerspaceClient) ListObjectives(ctx context.Context) ([]common.ClusterObjectiveResponse, error)
func (*HammerspaceClient) ListShares ¶
func (client *HammerspaceClient) ListShares(ctx context.Context) ([]common.ShareResponse, error)
func (*HammerspaceClient) ListSnapshots ¶
func (client *HammerspaceClient) ListSnapshots(ctx context.Context, snapshot_id, volume_id string) ([]common.SnapshotResponse, error)
func (*HammerspaceClient) ListVolumes ¶
func (client *HammerspaceClient) ListVolumes(ctx context.Context) ([]common.VolumeResponse, error)
func (*HammerspaceClient) RestoreFileSnapToDestination ¶
func (client *HammerspaceClient) RestoreFileSnapToDestination(ctx context.Context, snapshotPath, filePath string) error
func (*HammerspaceClient) SetObjectives ¶
func (client *HammerspaceClient) SetObjectives(ctx context.Context, shareName string, path string, objectives []string, replaceExisting bool) error
Set objectives on a share, at the specified path, optionally clearing previously-set objectives at the path The path must start with a slash
func (*HammerspaceClient) SnapshotFile ¶
func (*HammerspaceClient) SnapshotShare ¶
func (*HammerspaceClient) UpdateShareSize ¶
func (client *HammerspaceClient) UpdateShareSize(ctx context.Context, name string, size int64) error
size in bytes
func (*HammerspaceClient) WaitForTaskCompletion ¶
Click to show internal directories.
Click to hide internal directories.