Documentation
¶
Index ¶
- Constants
- func CreateKubeClient(kubeConfig string, applyFuncs ...func(c *rest.Config)) (kubernetes.Interface, error)
- func GetKmeshNodeInfoClient() (nodeinfo.Interface, error)
- func NewInformerFactory(client kubernetes.Interface) informers.SharedInformerFactory
- type CLIClient
- type Client
- type ClientOption
- type PortForwarder
Constants ¶
View Source
const ( DefaultLocalAddress = "localhost" DefaultPodRunningTimeout = 30 * time.Second KmeshNamespace = "kmesh-system" )
Variables ¶
This section is empty.
Functions ¶
func CreateKubeClient ¶ added in v1.0.0
func CreateKubeClient(kubeConfig string, applyFuncs ...func(c *rest.Config)) (kubernetes.Interface, error)
CreateKubeClient creates a kube client with the given kubeconfig file, if no kubeconfig specified, in cluster kubeconfig will be used. applyFuncs is optional, which can be used to tune client rest.Config
func GetKmeshNodeInfoClient ¶ added in v1.0.0
func NewInformerFactory ¶
func NewInformerFactory(client kubernetes.Interface) informers.SharedInformerFactory
Types ¶
type CLIClient ¶ added in v1.0.0
type CLIClient interface { Client // PodsForSelector finds pods matching selector. PodsForSelector(ctx context.Context, namespace string, labelSelectors ...string) (*v1.PodList, error) // NewPortForwarder creates a new PortForwarder configured for the given pod. If localPort=0, a port will be // dynamically selected. If localAddress is empty, "localhost" is used. NewPortForwarder(podName string, ns string, localAddress string, localPort int, podPort int) (PortForwarder, error) }
CLIClient extends the Client interface with additional functionality for CLI operations.
func NewCLIClient ¶ added in v1.0.0
func NewCLIClient(opts ...ClientOption) (CLIClient, error)
type Client ¶ added in v1.0.0
type Client interface { // Kube returns the core kube client Kube() kubernetes.Interface // GatewayAPI returns the gateway-api kube client. GatewayAPI() gatewayapiclient.Interface }
Client defines the interface for accessing Kubernetes clients and resources.
type ClientOption ¶ added in v1.0.0
type PortForwarder ¶ added in v1.0.0
type PortForwarder interface { // Start runs this forwarder. Start() error // Address returns the local forwarded address. Only valid while the forwarder is running. Address() string // Close this forwarder and release an resources. Close() }
PortForwarder manages the forwarding of a single port.
Directories
¶
Path | Synopsis |
---|---|
apis
|
|
nodeinfo
|
|
clientset/versioned/fake
This package has the automatically generated fake clientset.
|
This package has the automatically generated fake clientset. |
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
|
This package contains the scheme of the automatically generated clientset. |
clientset/versioned/typed/kmeshnodeinfo/v1alpha1
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
clientset/versioned/typed/kmeshnodeinfo/v1alpha1/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
Click to show internal directories.
Click to hide internal directories.