Documentation
¶
Index ¶
- func ArchitectureFromShape(shape string) string
- func CreateEFIImageSchema(compartmentId string, imageId string) error
- func EnsureCompatibleImageShapes(imageId string, arch string) error
- func EnsureImage(imageName string, k8sVersion string, arch string, compartmentId string, ...) (string, string, error)
- func EnsureObject(bucketName string, objectName string, contentLen int64, content io.ReadCloser, ...) error
- func GetCompartmentId(compartmentName string) (string, error)
- func GetImage(imageName string, k8sVersion string, arch string, compartmentId string) (*core.Image, bool, error)
- func GetImageById(ocid string) (*core.Image, error)
- func GetNamespace() (string, error)
- func GetWorkRequestStatus(workRequestId string) (workrequests.WorkRequestStatusEnum, float32, error)
- func ImportImage(imageName string, k8sVersion string, arch string, compartmentId string, ...) (string, string, error)
- func UploadObject(bucketName string, objectName string, contentLen int64, content io.ReadCloser, ...) error
- func WaitForWorkRequest(workRequestId string, prefix string) error
- func WaitForWorkRequests(requests map[string]string) error
- type OciConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchitectureFromShape ¶
func CreateEFIImageSchema ¶
func EnsureCompatibleImageShapes ¶
EnsureCompatibleImageShapes ensures that the image has the correct list of compatible image shapes, based on the image architecture.
func EnsureImage ¶
func EnsureImage(imageName string, k8sVersion string, arch string, compartmentId string, bucketName string, objectName string) (string, string, error)
EnsureImage makes sure that an image with a given display name exists. If it already does, then it returns the OCID of that image. If not, it will start the process of importing the image from the given object storage description. A work request OCID is returned to as well to allow the caller to monitor pogress.
func EnsureObject ¶
func EnsureObject(bucketName string, objectName string, contentLen int64, content io.ReadCloser, metadata map[string]string) error
EnsureObject ensures that an object exists in object storage and that the object is the same as the one that is desired. If the object exists and is the same, then the function simply returns. If not, it uploads the object to the given bucket and object name.
func GetCompartmentId ¶
Takes a path to a compartment name in the format compartment1/compartment2/compartment3 and locates the OCID of the indicated compartment by following the path.
func GetImage ¶
func GetImage(imageName string, k8sVersion string, arch string, compartmentId string) (*core.Image, bool, error)
GetImage fetches the OCID of the latest image by name, Kubernetes version, and architecture.
func GetNamespace ¶
GetNamespace returns the object storage namespace for this tenancy
func GetWorkRequestStatus ¶
func GetWorkRequestStatus(workRequestId string) (workrequests.WorkRequestStatusEnum, float32, error)
GetWorkRequestStatus gives a summary of a work request. Specifically, it returns the current status and completion percentage.
func ImportImage ¶
func ImportImage(imageName string, k8sVersion string, arch string, compartmentId string, bucketName string, objectName string) (string, string, error)
ImportImage creates a custom compute image from the contents of an object storage bucket.
func UploadObject ¶
func UploadObject(bucketName string, objectName string, contentLen int64, content io.ReadCloser, metadata map[string]string) error
UploadObject uploads the contents of a stream to an object storage bucket
func WaitForWorkRequest ¶
WaitForWorkRequest waits for a work request to complete, while pretty printing the progress. If the work request fails, then an error is returned.
func WaitForWorkRequests ¶
WaitForWorkRequestswaits for a set of work requests, to complete, while pretty printing the progress. If any work requests fail, an error is returned.