curl

package
v0.0.0-...-546eec4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package curl provides a http implementation that utilises curl requests on an existing k8s pod

Index

Constants

View Source
const DEBUG = false

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config Config
	*kube.Kubernetes
}

func New

func New(c Config, kubernetes *kube.Kubernetes) *Client

func (*Client) CloneForPod

func (c *Client) CloneForPod(podName string) *Client

func (*Client) Delete

func (c *Client) Delete(path string, headers map[string]string) (*http.Response, error)

func (*Client) Get

func (c *Client) Get(path string, headers map[string]string) (*http.Response, error)

func (*Client) Head

func (c *Client) Head(path string, headers map[string]string) (*http.Response, error)

func (*Client) Post

func (c *Client) Post(path, payload string, headers map[string]string) (*http.Response, error)

func (*Client) PostMultipart

func (c *Client) PostMultipart(path string, parts map[string]string, headers map[string]string) (*http.Response, error)

func (*Client) Put

func (c *Client) Put(path, payload string, headers map[string]string) (*http.Response, error)

type Config

type Config struct {
	Credentials *Credentials
	Container   string
	Podname     string
	Namespace   string
	Protocol    string
	Port        int
}

type Credentials

type Credentials struct {
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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