utils

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandPath

func ExpandPath(path string) (string, error)

func IsRetryAble

func IsRetryAble(ctx context.Context, err error) bool

func PopenStream

func PopenStream(ctx context.Context, command string) error

Types

type CleanupFunc

type CleanupFunc func()

CleanupFunc 清理函数类型

type CleanupRegistry

type CleanupRegistry struct {
	// contains filtered or unexported fields
}

CleanupCtx 清理上下文结构

func NewCleanupRegistry

func NewCleanupRegistry() *CleanupRegistry

NewCleanupCtx 创建清理上下文

func (*CleanupRegistry) Execute

func (c *CleanupRegistry) Execute()

Execute 执行所有清理函数(逆序)

func (*CleanupRegistry) Register

func (c *CleanupRegistry) Register(f CleanupFunc)

Register 注册清理函数

Jump to

Keyboard shortcuts

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