clientcache

package
v1.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 New

func New(localClient client.Client, noCacheClient client.Client, scheme *runtime.Scheme) *ClientCache

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL