agents

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiServerProxyPath

func ApiServerProxyPath(namespace, schema, svcname, port string) string

Types

type APIServerInfoClient

type APIServerInfoClient struct {
	APIServerHost *url.URL
	Discovery     discovery.DiscoveryInterface
}

func NewAPIServerInfoClient

func NewAPIServerInfoClient(cfg *rest.Config) (*APIServerInfoClient, error)

func NewAPIServerInfoClientOrEmpty

func NewAPIServerInfoClientOrEmpty(cfg *rest.Config) *APIServerInfoClient

func (*APIServerInfoClient) APIServerAddr

func (c *APIServerInfoClient) APIServerAddr() string

func (*APIServerInfoClient) APIServerVersion

func (c *APIServerInfoClient) APIServerVersion() string

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
}

func NewDelegateClientClient

func NewDelegateClientClient(name string, cfg *agentcli.Config, kubecfg *rest.Config, schema *runtime.Scheme, tracer trace.Tracer) (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

func (h *ClientSet) ClientOfManager(ctx context.Context) (Client, error)

func (*ClientSet) ClientOptionsOf

func (h *ClientSet) ClientOptionsOf(ctx context.Context, name string) (*client.Config, *rest.Config, error)

func (*ClientSet) Clusters

func (h *ClientSet) Clusters() []string

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

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

func (c *DelegateClient) Config() *agentcli.Config

func (*DelegateClient) Extend

func (c *DelegateClient) Extend() *extend.ExtendClient

func (*DelegateClient) Info

func (*DelegateClient) Name

func (c *DelegateClient) Name() string

func (*DelegateClient) ProxyTransport

func (c *DelegateClient) ProxyTransport() http.RoundTripper

func (*DelegateClient) ReverseProxy

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.

func (*DelegateClient) Transport

func (c *DelegateClient) Transport() http.RoundTripper

func (*DelegateClient) Websocket

func (c *DelegateClient) Websocket() *agentcli.WebsocketClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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