Documentation
¶
Index ¶
- func ApiServerProxyPath(namespace, schema, svcname, port string) string
- func ClientOptionsOf(ctx context.Context, cluster *models.Cluster) (*client.Config, *rest.Config, error)
- type APIServerInfoClient
- type AgentAPIServerInfoClient
- type Client
- type ClientSet
- func (h *ClientSet) ClientOf(ctx context.Context, name string) (Client, error)
- func (h *ClientSet) ClientOfManager(ctx context.Context) (Client, error)
- func (h *ClientSet) Clusters() []string
- func (h *ClientSet) ExecuteInEachCluster(ctx context.Context, f func(ctx context.Context, cli Client) error) error
- func (h *ClientSet) Invalidate(ctx context.Context, name string)
- type DelegateClient
- func (c *DelegateClient) Config() *agentcli.Config
- func (c *DelegateClient) Extend() *extend.ExtendClient
- func (c *DelegateClient) Info() APIServerInfoClient
- func (c *DelegateClient) KubeConfig() *rest.Config
- func (c *DelegateClient) Name() string
- func (c *DelegateClient) ProxyTransport() http.RoundTripper
- func (c *DelegateClient) ReverseProxy(dests ...*url.URL) *httputil.ReverseProxy
- func (c *DelegateClient) Transport() http.RoundTripper
- func (c *DelegateClient) Websocket() *agentcli.WebsocketClient
- type EmptyAPIServerInfoClient
- type KubeConfigAPIServerInfoClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiServerProxyPath ¶
func ApiServerProxyPath(namespace, schema, svcname, port string) string
func ClientOptionsOf ¶ added in v1.24.4
func ClientOptionsOf(ctx context.Context, cluster *models.Cluster) (*client.Config, *rest.Config, error)
Types ¶
type APIServerInfoClient ¶ added in v1.23.12
type APIServerInfoClient interface {
APIServerAddr() string
APIServerVersion() string
}
func NewAPIServerInfoClientOrEmpty ¶ added in v1.23.12
func NewAPIServerInfoClientOrEmpty(ext *extend.ExtendClient, cfg *rest.Config) APIServerInfoClient
type AgentAPIServerInfoClient ¶ added in v1.24.4
type AgentAPIServerInfoClient struct {
ExtendClient *extend.ExtendClient
}
func (AgentAPIServerInfoClient) APIServerAddr ¶ added in v1.24.4
func (a AgentAPIServerInfoClient) APIServerAddr() string
APIServerAddr implements APIServerInfoClient.
func (AgentAPIServerInfoClient) APIServerVersion ¶ added in v1.24.4
func (a AgentAPIServerInfoClient) APIServerVersion() string
APIServerVersion implements APIServerInfoClient.
type Client ¶
type Client interface {
client.WithWatch
Name() string
Info() APIServerInfoClient
Websocket() *agentcli.WebsocketClient
Extend() *extend.ExtendClient
// ReverseProxy return a new reverse proxy that proxy requests to the agent.
// if target set, proxy to target instead of agent.
ReverseProxy(destOverride ...*url.URL) *httputil.ReverseProxy
// Config return the config to build a client.
Config() *agentcli.Config
// ProxyTransport return a transport that handle requests like it happens in the agent pod.
ProxyTransport() http.RoundTripper
KubeConfig() *rest.Config
}
func NewClientFor ¶ added in v1.24.4
func NewClientFor(ctx context.Context, cluster *models.Cluster) (Client, error)
func NewDelegateClientClient ¶ added in v1.23.8
func NewDelegateClientClient(name string, cfg *agentcli.Config, kubecfg *rest.Config, schema *runtime.Scheme) (Client, error)
type ClientSet ¶
type ClientSet struct {
// contains filtered or unexported fields
}
func NewClientSet ¶
func NewClientSet(database *database.Database) (*ClientSet, error)
func (*ClientSet) ClientOf ¶
func (h *ClientSet) ClientOf(ctx context.Context, name string) (Client, error)
func (*ClientSet) ClientOfManager ¶ added in v1.22.0
func (h *ClientSet) ClientOfManager(ctx context.Context) (Client, error)
func (*ClientSet) ExecuteInEachCluster ¶
func (h *ClientSet) ExecuteInEachCluster(ctx context.Context, f func(ctx context.Context, cli Client) error) error
ExecuteInEachCluster Execute in each cluster concurrently
func (*ClientSet) Invalidate ¶ added in v1.22.0
func (h *ClientSet) Invalidate(ctx context.Context, name string)
Invalidate a client of name cluster and recreate after.
type DelegateClient ¶
type DelegateClient struct {
*agentcli.TypedClient
// contains filtered or unexported fields
}
func (*DelegateClient) Config ¶ added in v1.23.12
func (c *DelegateClient) Config() *agentcli.Config
func (*DelegateClient) KubeConfig ¶ added in v1.24.4
func (c *DelegateClient) KubeConfig() *rest.Config
func (*DelegateClient) ProxyTransport ¶ added in v1.23.12
func (c *DelegateClient) ProxyTransport() http.RoundTripper
func (*DelegateClient) ReverseProxy ¶ added in v1.23.12
func (c *DelegateClient) ReverseProxy(dests ...*url.URL) *httputil.ReverseProxy
ReverseProxy return a http.Handler that proxy requests to the agent. if target set, proxy to target instead of to agent.
type EmptyAPIServerInfoClient ¶ added in v1.24.4
type EmptyAPIServerInfoClient struct{}
func (EmptyAPIServerInfoClient) APIServerAddr ¶ added in v1.24.4
func (c EmptyAPIServerInfoClient) APIServerAddr() string
func (EmptyAPIServerInfoClient) APIServerVersion ¶ added in v1.24.4
func (c EmptyAPIServerInfoClient) APIServerVersion() string
type KubeConfigAPIServerInfoClient ¶ added in v1.24.4
type KubeConfigAPIServerInfoClient struct {
APIServerHost *url.URL
Discovery discovery.DiscoveryInterface
}
func NewAPIServerInfoClient ¶ added in v1.23.12
func NewAPIServerInfoClient(cfg *rest.Config) (*KubeConfigAPIServerInfoClient, error)
func (*KubeConfigAPIServerInfoClient) APIServerAddr ¶ added in v1.24.4
func (c *KubeConfigAPIServerInfoClient) APIServerAddr() string
func (*KubeConfigAPIServerInfoClient) APIServerVersion ¶ added in v1.24.4
func (c *KubeConfigAPIServerInfoClient) APIServerVersion() string
Click to show internal directories.
Click to hide internal directories.