tools

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeployCurl

func DeployCurl(kubeClient kubernetes.Interface, ns, pod string) (*v1.Pod, error)

DeployCurl helps deploying a Pod that provides "curl" you must wait for it to be ready

Types

type CurlOpts

type CurlOpts struct {
	Silent   bool
	Insecure bool
	Username string
	Password string
	Timeout  int
	Verbose  bool
}

CurlOpts allows specifying arguments to run curl on a pod

func (*CurlOpts) ToParams

func (c *CurlOpts) ToParams() []string

ToParams returns curl options serialized as a string slice

type CurlResponse

type CurlResponse struct {
	HttpVersion  string
	StatusCode   int
	ReasonPhrase string
	Headers      map[string]string
	Body         string
	Output       string
}

CurlResponse wraps a response for a curl execution

func Curl

func Curl(kubeClient kubernetes.Interface, config *restclient.Config, ns, podName, url string, opts CurlOpts) (*CurlResponse, error)

Curl runs curl on a given pod (or if empty, it will try to find the service-controller pod and run against it).

Jump to

Keyboard shortcuts

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