Documentation
¶
Index ¶
- type Cluster
- func (c *Cluster) APIServerEndpoint() string
- func (c *Cluster) Client() client.Client
- func (c *Cluster) Cluster() cluster.Cluster
- func (c *Cluster) ConfigPath() string
- func (c *Cluster) HasClient() bool
- func (c *Cluster) HasID() bool
- func (c *Cluster) HasRESTConfig() bool
- func (c *Cluster) ID() string
- func (c *Cluster) InitializeClient(scheme *runtime.Scheme) error
- func (c *Cluster) InitializeID(id string)
- func (c *Cluster) InitializeRESTConfig() error
- func (c *Cluster) RESTConfig() *rest.Config
- func (c *Cluster) RegisterConfigPathFlag(flags *flag.FlagSet)
- func (c *Cluster) Scheme() *runtime.Scheme
- func (c *Cluster) WithConfigPath(cfgPath string) *Cluster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func (*Cluster) APIServerEndpoint ¶
APIServerEndpoint returns the cluster's API server endpoint. Returns an empty string if the REST config has not been initialized.
func (*Cluster) Cluster ¶
Cluster returns the cluster's controller-runtime 'Cluster' representation.
func (*Cluster) ConfigPath ¶
ConfigPath returns the cluster's config path.
func (*Cluster) HasClient ¶
HasClient returns true if the cluster has a client. If this returns false, create a client via InitializeClient().
func (*Cluster) HasID ¶
HasID returns true if the cluster has an id. If this returns false, initialize a new cluster via New() or InitializeID().
func (*Cluster) HasRESTConfig ¶
HasRESTConfig returns true if the cluster has a REST config. If this returns false, load the config via InitializeRESTConfig().
func (*Cluster) InitializeClient ¶
InitializeClient creates a new client for the cluster. This also initializes the cluster's controller-runtime 'Cluster' representation. If the client has already been initialized, this is a no-op. Panics if the cluster's REST config has not been loaded (InitializeRESTConfig must be called first).
func (*Cluster) InitializeID ¶
InitializeID sets the cluster's id. Panics if id is empty.
func (*Cluster) InitializeRESTConfig ¶
InitializeRESTConfig loads the cluster's REST config. If the config has already been loaded, this is a no-op. Panics if the cluster's id is not set (InitializeID must be called first).
func (*Cluster) RESTConfig ¶
RESTConfig returns the cluster's REST config. This returns a pointer, but modification can lead to inconsistent behavior and is not recommended.
func (*Cluster) RegisterConfigPathFlag ¶
RegisterConfigPathFlag adds a flag '--<id>-cluster' for the cluster's config path to the given flag set. Panics if the cluster's id is not set.
func (*Cluster) Scheme ¶
Scheme returns the cluster's scheme. Returns nil if the client has not been initialized.
func (*Cluster) WithConfigPath ¶
WithConfigPath sets the config path for the cluster. Returns the cluster for chaining.