Documentation ¶
Index ¶
- Variables
- func CheckAndCreateDir(path string) error
- func CmdRunWithTimeout(cmd *exec.Cmd, timeout time.Duration) (bool, error)
- func Deweight(data *[]string)
- func Exec(ctx context.Context, f func() error, wait time.Duration) error
- func FileExists(filename string) (bool, error)
- func GetIDFromKey(key string) string
- func IntermittentExec(ctx context.Context, f func(), t time.Duration)
- func LocalIP() (net.IP, error)
- func NewUUID() string
- func OpenOrCreateFile(filename string) (*os.File, error)
- func ReadHostID(filePath string) (string, error)
- func SendNoBlocking(m []byte, ch chan []byte)
- type SSHClient
Constants ¶
This section is empty.
Variables ¶
View Source
var StatefulServiceType = "StatefulServiceType"
StatefulServiceType 有状态应用
View Source
var StatelessServiceType = "StatelessServiceType"
StatelessServiceType 无状态应用
Functions ¶
func CheckAndCreateDir ¶
CheckAndCreateDir check and create dir
func CmdRunWithTimeout ¶
CmdRunWithTimeout exec cmd with timeout
func IntermittentExec ¶
IntermittentExec 间歇性执行
func OpenOrCreateFile ¶
OpenOrCreateFile open or create file
func ReadHostID ¶
ReadHostID 读取当前机器ID ID是节点的唯一标识,acp_node将把ID与机器信息的绑定关系维护于etcd中
Types ¶
Click to show internal directories.
Click to hide internal directories.