client

package
v0.0.0-...-22d8ab2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplyPatchContentType ContentType = "application/apply-patch+yaml"
	MergePatchContentType             = "application/merge-patch+json"
	JSONContentType                   = "application/json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HttpClient *http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host string, tp token.TokenProvider, ca []byte) (*Client, error)

func NewInCluster

func NewInCluster() (*Client, error)

NewInCluster creates Client if it is inside Kubernetes.

func (*Client) Do

func (kc *Client) Do(r ResourceRequest) (*http.Response, error)

func (*Client) DoRaw

func (kc *Client) DoRaw(req *http.Request) (*http.Response, error)

type ContentType

type ContentType string

type ResourceRequest

type ResourceRequest struct {
	GVR         types.GroupVersionResource
	Subresource string
	Verb        string
	Namespace   string
	Name        string
	ContentType ContentType
	Values      url.Values
	Body        io.Reader
}

func (ResourceRequest) URL

func (r ResourceRequest) URL() string

Jump to

Keyboard shortcuts

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