Documentation
¶
Overview ¶
Package config provides utilities to get configuration.
Index ¶
- Variables
- func ClusterName(name string) string
- func FilterWithType[T InternalObject](objs []InternalObject) (out []T)
- func FilterWithTypeFromContext[T metav1.Object](ctx context.Context) (out []T)
- 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 Save(ctx context.Context, path string, objs []InternalObject) error
- type InternalObject
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", path.WorkDir()) // ClustersDir is the directory of the clusters. ClustersDir = path.Join(WorkDir, "clusters") // GOOS is the operating system target for which the code is compiled. GOOS = runtime.GOOS // GOARCH is the architecture target for which the code is compiled. GOARCH = runtime.GOARCH )
Functions ¶
func FilterWithType ¶
func FilterWithType[T InternalObject](objs []InternalObject) (out []T)
FilterWithType returns a list of objects with the given type.
func FilterWithTypeFromContext ¶
FilterWithTypeFromContext returns all objects of the given type from the context.
func GetKwokConfiguration ¶
func GetKwokConfiguration(ctx context.Context) (conf *internalversion.KwokConfiguration)
GetKwokConfiguration get the configuration of the kwok.
func GetKwokctlConfiguration ¶
func GetKwokctlConfiguration(ctx context.Context) (conf *internalversion.KwokctlConfiguration)
GetKwokctlConfiguration get the configuration of the kwokctl.
Types ¶
type InternalObject ¶ added in v0.2.0
InternalObject is an object that is internal to the kwok project.
func FilterWithoutType ¶
func FilterWithoutType[T InternalObject](objs []InternalObject) (out []InternalObject)
FilterWithoutType filters out objects of the given type.
func FilterWithoutTypeFromContext ¶
func FilterWithoutTypeFromContext[T InternalObject](ctx context.Context) (out []InternalObject)
FilterWithoutTypeFromContext returns all objects from the context that are not of the given type.
Directories
¶
Path | Synopsis |
---|---|
Package compatibility provides compatible for old version of kwokctl.
|
Package compatibility provides compatible for old version of kwokctl. |
Click to show internal directories.
Click to hide internal directories.