Documentation ¶
Overview ¶
Package kind provides kind cluster functionalities
Package kind provides kind cluster functionalities
Index ¶
- func NewLogger(logLevel log.Level) log.Logger
- func NewLoggerWithChannel(ch chan string, logLevel log.Level) log.Logger
- type Client
- type InfoLogger
- type KindClusterOptions
- type KindClusterProvider
- type KindClusterProxy
- func (k *KindClusterProxy) CreateKindCluster() (string, error)
- func (k *KindClusterProxy) DeleteKindCluster() error
- func (k *KindClusterProxy) GetKindClusterName() string
- func (k *KindClusterProxy) GetKindNodeImageAndConfig() (string, *kindv1.Cluster, error)
- func (k *KindClusterProxy) ResolveHostname(repositoryPath string) string
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { // CreateKindCluster creates new kind cluster CreateKindCluster() (string, error) // DeleteKindCluster deletes existing kind cluster DeleteKindCluster() error // GetKindClusterName returns name of the kind cluster GetKindClusterName() string // GetKindNodeImageAndConfig returns the kind node image and kind config GetKindNodeImageAndConfig() (string, *kindv1.Cluster, error) }
Client is used to create/delete kubernetes-in-docker cluster
func New ¶
func New(options *KindClusterOptions) Client
New returns client to interact with kind clusters
type InfoLogger ¶
type InfoLogger struct {
// contains filtered or unexported fields
}
InfoLogger defines the info logging interface kind uses
func (*InfoLogger) Enabled ¶
func (l *InfoLogger) Enabled() bool
Enabled should return true if this verbosity level is enabled
func (*InfoLogger) Info ¶
func (l *InfoLogger) Info(message string)
Info is used to write a user facing status message
func (*InfoLogger) Infof ¶
func (l *InfoLogger) Infof(format string, args ...interface{})
Infof is used to write a Printf style user facing status message
type KindClusterOptions ¶
type KindClusterOptions struct { Provider KindClusterProvider ClusterName string NodeImage string KubeConfigPath string TKGConfigDir string Readerwriter tkgconfigreaderwriter.TKGConfigReaderWriter DefaultImageRepo string }
KindClusterOptions carries options to configure kind cluster
type KindClusterProvider ¶
type KindClusterProvider interface { Create(name string, options ...cluster.CreateOption) error Delete(name, explicitKubeconfigPath string) error KubeConfig(name string, internal bool) (string, error) }
KindClusterProvider is interface for creating/deleting kind cluster
type KindClusterProxy ¶
type KindClusterProxy struct {
// contains filtered or unexported fields
}
KindClusterProxy return the Proxy used for operating kubernetes-in-docker clusters
func (*KindClusterProxy) CreateKindCluster ¶
func (k *KindClusterProxy) CreateKindCluster() (string, error)
CreateKindCluster creates new kind cluster
func (*KindClusterProxy) DeleteKindCluster ¶
func (k *KindClusterProxy) DeleteKindCluster() error
DeleteKindCluster deletes existing kind cluster
func (*KindClusterProxy) GetKindClusterName ¶
func (k *KindClusterProxy) GetKindClusterName() string
GetKindClusterName returns name of the kind cluster
func (*KindClusterProxy) GetKindNodeImageAndConfig ¶
func (k *KindClusterProxy) GetKindNodeImageAndConfig() (string, *kindv1.Cluster, error)
GetKindNodeImageAndConfig return the Kind node Image full path and configuration details
func (*KindClusterProxy) ResolveHostname ¶
func (k *KindClusterProxy) ResolveHostname(repositoryPath string) string
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger implements interface to retrieve logs from kind cluster provider
func (*Logger) Error ¶
Error may be used to write an error message when it occurs Prefer returning an error instead in most cases
func (*Logger) Errorf ¶
Errorf may be used to write a Printf style error message when it occurs Prefer returning an error instead in most cases
func (*Logger) V ¶
func (l *Logger) V(level log.Level) log.InfoLogger
V returns an InfoLogger for a given verbosity Level