Documentation ¶
Index ¶
- type ClientCache
- func (c *ClientCache) AddClient(k8sContextName string, cli client.Client)
- func (c *ClientCache) CreateRemoteClientsFromSecret(secretKey types.NamespacedName) error
- func (c *ClientCache) GetAllClients() []client.Client
- func (c *ClientCache) GetLocalClient() client.Client
- func (c *ClientCache) GetLocalNonCacheClient() client.Client
- func (c *ClientCache) GetRemoteClient(k8sContextName string) (client.Client, error)
- func (c *ClientCache) GetRemoteClients() map[string]client.Client
- func (c *ClientCache) GetRestConfig(assistCfg *api.ClientConfig) (*rest.Config, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientCache ¶
type ClientCache struct {
// contains filtered or unexported fields
}
func (*ClientCache) AddClient ¶
func (c *ClientCache) AddClient(k8sContextName string, cli client.Client)
AddClient adds a new remoteClient with the name k8sContextName
func (*ClientCache) CreateRemoteClientsFromSecret ¶
func (c *ClientCache) CreateRemoteClientsFromSecret(secretKey types.NamespacedName) error
CreateRemoteClientsFromSecret is a convenience method for testing purposes
func (*ClientCache) GetAllClients ¶ added in v1.4.0
func (c *ClientCache) GetAllClients() []client.Client
GetAllClients returns all the remote clients, plus the local one.
func (*ClientCache) GetLocalClient ¶
func (c *ClientCache) GetLocalClient() client.Client
GetLocalClient returns the current cluster's client used for operator's local communication
func (*ClientCache) GetLocalNonCacheClient ¶
func (c *ClientCache) GetLocalNonCacheClient() client.Client
func (*ClientCache) GetRemoteClient ¶
func (c *ClientCache) GetRemoteClient(k8sContextName string) (client.Client, error)
GetRemoteClient returns the client to remote cluster with name k8sContextName or error if no such client is cached
func (*ClientCache) GetRemoteClients ¶
func (c *ClientCache) GetRemoteClients() map[string]client.Client
GetRemoteClients returns all the remote clients
func (*ClientCache) GetRestConfig ¶
func (c *ClientCache) GetRestConfig(assistCfg *api.ClientConfig) (*rest.Config, error)
GetRestConfig takes the ClientConfig and parses the *rest.Config from it
Click to show internal directories.
Click to hide internal directories.