Documentation ¶
Index ¶
- Constants
- Variables
- func AddDelegateCommand(parent *cobra.Command, command, description string) *cobra.Command
- func BuildCommand(version, buildHash, buildDate string) *cobra.Command
- func DelegateCommandToPython(command *cobra.Command, args []string)
- func DeleteCreds() error
- func ExtractAssetZip(assetName, destDir string) error
- func MakeClient() (*api.Client, error)
- func MakeClientWithCreds(key string, insecure bool) (*api.Client, error)
- func SetupCloseHandler()
- type CommandDesc
- type Creds
- type PkgVersionInfo
- type PythonPathInfo
Constants ¶
const LibcExec = "libc-exe"
const SitePackagesName = "site-packages.zip"
Variables ¶
var FlywheelUserHome, ConfigPath, CachePath string
var PythonCliCommand = []string{"-I", "-m", "flywheel_cli.main"}
var UserAgent = ""
Functions ¶
func AddDelegateCommand ¶
Add a command to parent that will be delegated to python
func BuildCommand ¶
func DelegateCommandToPython ¶
Exits if the command is delegated
func DeleteCreds ¶
func DeleteCreds() error
func ExtractAssetZip ¶
Extract a go-bindata encoded asset zipfile to destDir
func MakeClient ¶
MakeClient attempts to create an SDK client using LoadCreds.
func SetupCloseHandler ¶
func SetupCloseHandler()
SetupCloseHandler creates a 'listener' on a new goroutine which will notify the program if it receives an interrupt from the OS. We need this because the ingest handles the first SIGTERM, but does not force exit all workers - however the 2nd SIGTERM would not reach python if we exit the GO program - this way the python might not exit
Types ¶
type CommandDesc ¶
type Creds ¶
Creds represents the state that is stored in the user's homedir, at ConfigPath.
type PkgVersionInfo ¶
type PythonPathInfo ¶
func PopulateCache ¶
func PopulateCache(cacheDir string) (*PythonPathInfo, error)
Extract the python interpreter and site-packages.zip to the cache directory