util

package
v0.0.0-...-6b231d8 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 5 Imported by: 0

Documentation

Overview

* Tencent is pleased to support the open source community by making TKEStack * available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an “AS IS” BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.

* Tencent is pleased to support the open source community by making TKEStack * available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an “AS IS” BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.

* Tencent is pleased to support the open source community by making TKEStack * available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an “AS IS” BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var RetryAbleErr = fmt.Errorf("retry")

RetryAbleErr should be returned if you want RetryUntilTimeout to retry

Functions

func CpuQuantityStr

func CpuQuantityStr(q *resource.Quantity) string

CpuQuantityStr returns a string in Core

func InitObjViaYaml

func InitObjViaYaml(obj interface{}, config interface{}) error

InitObjViaYaml marshal "config" to yaml data, then unMarshal data to "obj"

func MemQuantityStr

func MemQuantityStr(q *resource.Quantity) string

MemQuantityStr returns a string in GB

func RetryUntilTimeout

func RetryUntilTimeout(interval time.Duration, timeout time.Duration, do func() error) error

RetryUntilTimeout retry target function "do" until timeout

Types

This section is empty.

Jump to

Keyboard shortcuts

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