restclient

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAddrMiss    = Error{"customhttp: inetaddr miss"}
	ErrInvalidAddr = Error{"customhttp: invalid inetaddr"}
)

Functions

func GetDefaultConfig

func GetDefaultConfig(apiPath string) *rest.Config

func NewClientSet

func NewClientSet(addr string, config *Config) (*kubernetes.Clientset, error)

func SetInetAddr

func SetInetAddr(addr string)

用于覆盖根据环境变量取的值

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

func (Error) Error

func (e Error) Error() string

type InetRESTClient

type InetRESTClient struct {
	*RESTClient
	// contains filtered or unexported fields
}

func NewInetRESTClient

func NewInetRESTClient(addr string, config *Config) (*InetRESTClient, error)

func (*InetRESTClient) Delete

func (c *InetRESTClient) Delete() *Request

func (*InetRESTClient) Get

func (c *InetRESTClient) Get() *Request

func (*InetRESTClient) Patch

func (c *InetRESTClient) Patch(pt types.PatchType) *Request

func (*InetRESTClient) Post

func (c *InetRESTClient) Post() *Request

func (*InetRESTClient) Put

func (c *InetRESTClient) Put() *Request

func (*InetRESTClient) Verb

func (c *InetRESTClient) Verb(verb string) *Request

Jump to

Keyboard shortcuts

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