Documentation
¶
Overview ¶
Package predictor provides shell completion predictors for nctl resources.
Index ¶
- func NewClient(ctx context.Context, defaultAPICluster string) (*api.Client, error)
- func NewInstanceDatabases(client *api.Client, gvk schema.GroupVersionKind) complete.Predictor
- func NewResourceName(client *api.Client) complete.Predictor
- func NewResourceNameWithKind(client *api.Client, gvk schema.GroupVersionKind) complete.Predictor
- type InstanceDatabases
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶ added in v1.12.2
NewClient creates an API client configured for shell completion. It uses a static token since dynamic exec config breaks with some shells during completion.
func NewInstanceDatabases ¶ added in v1.18.0
NewInstanceDatabases returns a predictor that completes database names for a dedicated instance resource. It fetches the instance named by the first positional argument on the command line and returns the keys of its status.atProvider.databases map.
func NewResourceName ¶
NewResourceName returns a predictor that infers the resource kind from the command arguments.
func NewResourceNameWithKind ¶ added in v1.9.0
NewResourceNameWithKind returns a predictor for a specific resource kind.
Types ¶
type InstanceDatabases ¶ added in v1.18.0
type InstanceDatabases struct {
// contains filtered or unexported fields
}
InstanceDatabases is a predictor that completes database names for a dedicated database instance (e.g. Postgres, MySQL) by reading the Databases map from its status.