Documentation
¶
Index ¶
- type Client
- func (c *Client) FindPodsAllNamespaces(ctx context.Context, labelSelector string) ([]corev1.Pod, error)
- func (c *Client) FindServicesAllNamespaces(ctx context.Context, labelSelector string) ([]corev1.Service, error)
- func (c *Client) GetPod(ctx context.Context, name string) (*corev1.Pod, error)
- func (c *Client) GetPodLogs(ctx context.Context, name string, opts PodLogsOptions) (io.ReadCloser, error)
- func (c *Client) GetService(ctx context.Context, name string) (*corev1.Service, error)
- func (c *Client) ListNamespaces(ctx context.Context) ([]corev1.Namespace, error)
- func (c *Client) ListPods(ctx context.Context, allNamespaces bool) ([]corev1.Pod, error)
- func (c *Client) ListServices(ctx context.Context, allNamespaces bool) ([]corev1.Service, error)
- func (c *Client) Namespace() string
- func (c *Client) TestConnection(ctx context.Context) (string, error)
- type ContextInfo
- type PodLogsOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the kubernetes clientset
func (*Client) FindPodsAllNamespaces ¶ added in v0.6.0
func (c *Client) FindPodsAllNamespaces(ctx context.Context, labelSelector string) ([]corev1.Pod, error)
FindPodsAllNamespaces searches all namespaces for pods matching a label selector
func (*Client) FindServicesAllNamespaces ¶ added in v0.6.0
func (c *Client) FindServicesAllNamespaces(ctx context.Context, labelSelector string) ([]corev1.Service, error)
FindServicesAllNamespaces searches all namespaces for services matching a label selector
func (*Client) GetPodLogs ¶
func (c *Client) GetPodLogs(ctx context.Context, name string, opts PodLogsOptions) (io.ReadCloser, error)
GetPodLogs returns a stream of logs from a pod
func (*Client) GetService ¶
GetService returns a single service by name
func (*Client) ListNamespaces ¶
ListNamespaces returns all namespaces in the cluster
func (*Client) ListPods ¶
ListPods returns pods in the specified namespace (or all namespaces if allNamespaces is true)
func (*Client) ListServices ¶
ListServices returns services in the specified namespace (or all namespaces if allNamespaces is true)
type ContextInfo ¶
ContextInfo holds information about a kubeconfig context
func ListContexts ¶
func ListContexts() ([]ContextInfo, error)
ListContexts returns all contexts from kubeconfig