Documentation ¶
Index ¶
- Variables
- func CheckDiskAttached(ctx context.Context, crusoeClient *crusoeapi.APIClient, ...) (bool, error)
- func CheckDiskMatchesRequest(disk *crusoeapi.DiskV1Alpha5, request *csi.CreateVolumeRequest, ...) error
- func FindDiskByIDFallible(ctx context.Context, crusoeClient *crusoeapi.APIClient, projectID string, ...) (*crusoeapi.DiskV1Alpha5, error)
- func FindDiskByNameFallible(ctx context.Context, crusoeClient *crusoeapi.APIClient, projectID string, ...) (*crusoeapi.DiskV1Alpha5, error)
- func GetCreateDiskRequest(request *csi.CreateVolumeRequest, location string, diskType common.DiskType) (*crusoeapi.DisksPostRequestV1Alpha5, error)
- func GetVolumeFromDisk(disk *crusoeapi.DiskV1Alpha5, pluginName, location string, ...) (*csi.Volume, error)
- func NewCrusoeClient(host, key, secret, userAgent string) *crusoeapi.APIClient
- func NormalizeDiskSizeToGiB(disk *crusoeapi.DiskV1Alpha5) (int, error)
- type AuthenticatingTransport
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownDiskSizeSuffix = errors.New("unknown disk size suffix") ErrDiskNotFound = errors.New("disk not found") ErrDiskDifferentSize = errors.New("disk has different size") ErrDiskDifferentName = errors.New("disk has different name") ErrDiskDifferentLocation = errors.New("disk has different location") ErrDiskDifferentBlockSize = errors.New("disk has different block size") ErrDiskDifferentType = errors.New("disk has different type") )
Functions ¶
func CheckDiskAttached ¶
func CheckDiskMatchesRequest ¶
func CheckDiskMatchesRequest(disk *crusoeapi.DiskV1Alpha5, request *csi.CreateVolumeRequest, expectedLocation string, expectedType common.DiskType, ) error
func FindDiskByIDFallible ¶
func FindDiskByNameFallible ¶
func GetCreateDiskRequest ¶
func GetCreateDiskRequest(request *csi.CreateVolumeRequest, location string, diskType common.DiskType, ) (*crusoeapi.DisksPostRequestV1Alpha5, error)
func GetVolumeFromDisk ¶
func NewCrusoeClient ¶
NewCrusoeClient initializes a new Crusoe API client with the given configuration.
func NormalizeDiskSizeToGiB ¶
func NormalizeDiskSizeToGiB(disk *crusoeapi.DiskV1Alpha5) (int, error)
Types ¶
type AuthenticatingTransport ¶
type AuthenticatingTransport struct { http.RoundTripper // contains filtered or unexported fields }
AuthenticatingTransport is a struct implementing http.Roundtripper that authenticates a request to Crusoe Cloud before sending it out.
func NewAuthenticatingTransport ¶
func NewAuthenticatingTransport(r http.RoundTripper, keyID, secretKey string) AuthenticatingTransport
Click to show internal directories.
Click to hide internal directories.