Documentation
¶
Index ¶
- Variables
- func ClusterName(name string) string
- func FilterWithType[T metav1.Object](objs []metav1.Object) (out []T)
- func FilterWithTypeFromContext[T metav1.Object](ctx context.Context) (out []T)
- func FilterWithoutType[T metav1.Object](objs []metav1.Object) (out []metav1.Object)
- func FilterWithoutTypeFromContext[T metav1.Object](ctx context.Context) (out []metav1.Object)
- func GetKwokConfiguration(ctx context.Context) (conf *internalversion.KwokConfiguration)
- func GetKwokctlConfiguration(ctx context.Context) (conf *internalversion.KwokctlConfiguration)
- func InitFlags(ctx context.Context, flags *pflag.FlagSet) (context.Context, error)
- func Load(ctx context.Context, path ...string) ([]metav1.Object, error)
- func Save(ctx context.Context, path string, objs []metav1.Object) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultCluster the default cluster name DefaultCluster = "kwok" // WorkDir is the directory of the work spaces. WorkDir = envs.GetEnvWithPrefix("WORKDIR", func() string { dir, err := os.UserHomeDir() if err != nil || dir == "" { return path.Join(os.TempDir(), consts.ProjectName) } return path.Join(dir, "."+consts.ProjectName) }()) // ClustersDir is the directory of the clusters. ClustersDir = path.Join(WorkDir, "clusters") )
Functions ¶
func ClusterName ¶
func FilterWithoutType ¶
func GetKwokConfiguration ¶
func GetKwokConfiguration(ctx context.Context) (conf *internalversion.KwokConfiguration)
func GetKwokctlConfiguration ¶
func GetKwokctlConfiguration(ctx context.Context) (conf *internalversion.KwokctlConfiguration)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.