adminapi

package
v2.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKongClientForWorkspace

func GetKongClientForWorkspace(ctx context.Context, adminURL string, wsName string,
	httpclient *http.Client) (*kong.Client, error)

GetKongClientForWorkspace returns a Kong API client for a given root API URL and workspace. If the workspace does not already exist, GetKongClientForWorkspace will create it.

func MakeHTTPClient

func MakeHTTPClient(opts *HTTPClientOpts) (*http.Client, error)

MakeHTTPClient returns an HTTP client with the specified mTLS/headers configuration. BUG: This function overwrites the default transport and client in package http! This problem is being left as-is during refactoring to avoid regression of untested code. https://github.com/Kong/kubernetes-ingress-controller/issues/1233

Types

type HTTPClientOpts

type HTTPClientOpts struct {
	TLSSkipVerify bool
	TLSServerName string
	CACertPath    string
	CACert        string
	Headers       []string
}

HTTPClientOpts defines parameters that configure an HTTP client.

type HeaderRoundTripper

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

HeaderRoundTripper injects Headers into requests made via RT.

func (*HeaderRoundTripper) RoundTrip

func (t *HeaderRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip satisfies the RoundTripper interface.

Directories

Path Synopsis
consumer/credentials
Package credentials includes validators for the credentials provided for KongConsumers.
Package credentials includes validators for the credentials provided for KongConsumers.

Jump to

Keyboard shortcuts

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