package argo import "git.sxidc.com/go-tools/argo-api/client" var clientInstance *client.Client func Init(kubeConfig string) error { if clientInstance != nil { return nil } c, err := client.NewClient(kubeConfig) if err != nil { return err } clientInstance = c return nil } func Destroy() { if clientInstance == nil { return } client.Destroy(clientInstance) clientInstance = nil } func GetInstance() *client.Client { return clientInstance }