util

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 10

Documentation

Overview

Package util encloses a series of packages within its structure, util used in the sense that these packages aren't specific or directly tied to the cloud sdk.

Index

Constants

View Source
const (
	// Apm kind
	Apm = "apm"

	// Appsearch kind
	Appsearch = "appsearch"

	// Elasticsearch kind
	Elasticsearch = "elasticsearch"

	// EnterpriseSearch kind
	EnterpriseSearch = "enterprise_search"

	// Kibana kind
	Kibana = "kibana"

	// IntegrationsServer kind
	IntegrationsServer = "integrations_server"
)
View Source
const (
	// DefaultRetries retries for the plan.TrackParams which accounts
	// for the Pending plan not being present in the backend, it will retry
	// the request the times specified here. 2 is the default anectdotically
	// because it provides a maximum sleeping time of (PollFrequency * 2)^2
	// or math.Exp2(2). Increasing this value will cause the PlanTracker to
	// sleep for more time than it's required, thus making ecctl less efficient.
	DefaultRetries = 2

	// DefaultPollFrequency is frequency on which the API is polled for updates
	// on pending plans. This value is also used as the cooldown time when used
	// with MaxRetries > 0.
	DefaultPollFrequency = time.Second * 10
)

Variables

Functions

func CompareStructs

func CompareStructs(a, b interface{}) (equals bool, diff string, err error)

CompareStructs two structs and return the differences

Types

type Validator

type Validator interface {
	Validate() error
}

Validator interface is mostly used for parameter structures that need to check a set of conditions and act as a gate before running expensive external calls

Directories

Path Synopsis
Package maps provides a set of functions around maps.
Package maps provides a set of functions around maps.
Package slice provides a set of functions around slices.
Package slice provides a set of functions around slices.

Jump to

Keyboard shortcuts

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