ociutil

package
v0.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkRequestPollInterval   = 5 * time.Second
	WorkRequestTimeout        = 2 * time.Minute
	MaxOPCRetryTokenBytes     = 64
	CreatedBy                 = "CreatedBy"
	OCIClusterAPIProvider     = "OCIClusterAPIProvider"
	ClusterResourceIdentifier = "ClusterResourceIdentifier"
)

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is for simulation during testing, OCI SDK does not have a way to create Service Errors

Functions

func AwaitLBWorkRequest

func AwaitLBWorkRequest(ctx context.Context, loadBalancerClient lb.LoadBalancerClient, workRequestId *string) (*loadbalancer.WorkRequest, error)

AwaitLBWorkRequest waits for the LBaaS work request to either succeed, fail. See k8s.io/apimachinery/pkg/util/wait

func AwaitNLBWorkRequest added in v0.9.0

func AwaitNLBWorkRequest(ctx context.Context, networkLoadBalancerClient nlb.NetworkLoadBalancerClient, workRequestId *string) (*networkloadbalancer.WorkRequest, error)

AwaitNLBWorkRequest waits for the LB work request to either succeed, fail. See k8s.io/apimachinery/pkg/util/wait

func BuildClusterTags

func BuildClusterTags(ClusterResourceUID string) map[string]string

BuildClusterTags uses the default tags and adds the ClusterResourceUID tag

func DerefString added in v0.3.0

func DerefString(s *string) string

DerefString returns the string value if the pointer isn't nil, otherwise returns empty string

func GetBaseLineOcpuOptimizationEnum

func GetBaseLineOcpuOptimizationEnum(baseLineOcpuOptmimizationString string) (core.LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum, error)

GetBaseLineOcpuOptimizationEnum iterates over the valid baseline OCPUs to validate the passed in value

func GetDefaultClusterTags

func GetDefaultClusterTags() map[string]string

GetDefaultClusterTags creates and returns a map of the default tags for all clusters

func GetInstanceConfigBaseLineOcpuOptimizationEnum added in v0.4.0

func GetInstanceConfigBaseLineOcpuOptimizationEnum(baseLineOcpuOptmimizationString string) (core.InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum, error)

GetInstanceConfigBaseLineOcpuOptimizationEnum iterates over the valid baseline OCPUs to validate the passed in value

func GetOPCRetryToken

func GetOPCRetryToken(format string, values ...interface{}) *string

GetOPCRetryToken truncates the values input and returns the OPC retry token

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the given error indicates that a resource could not be found.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL