MCPcopy
hub / github.com/kubesphere/kubekey / GetAllVariables

Method GetAllVariables

pkg/modules/internal/options.go:51–63  ·  view source on GitHub ↗

GetAllVariables retrieves all variables for the specified host in Execinternal.

()

Source from the content-addressed store, hash-verified

49
50// GetAllVariables retrieves all variables for the specified host in Execinternal.
51func (o ExecOptions) GetAllVariables() (map[string]any, error) {
52 ha, err := o.Get(variable.GetAllVariable(o.Host))
53 if err != nil {
54 return nil, err
55 }
56
57 vd, ok := ha.(map[string]any)
58 if !ok {
59 return nil, errors.Errorf("host: %s variable is not a map", o.Host)
60 }
61
62 return vd, nil
63}
64
65// GetConnector returns a connector for the specified host in Execinternal.
66func (o ExecOptions) GetConnector(ctx context.Context) (connector.Connector, error) {

Callers 15

GetConnectorMethod · 0.95
ModuleFetchFunction · 0.80
ModuleIncludeVarsFunction · 0.80
ModuleImageFunction · 0.80
ModuleCopyFunction · 0.80
ModuleResultFunction · 0.80
ModulePrometheusFunction · 0.80
ModuleCommandFunction · 0.80
ModuleSetupFunction · 0.80
ModuleDebugFunction · 0.80
ModuleHttpGetFileFunction · 0.80
ModuleGenCertFunction · 0.80

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected