client

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client wraps up the raw OpenAPI client with things to make it useable e.g. authorization and TLS.

func New

func New(client client.Client, options *Options, clientOptions *coreclient.HTTPClientOptions) *Client

New creates a new client.

func (*Client) APIClient

func (c *Client) APIClient(ctx context.Context) (*openapi.ClientWithResponses, error)

APIClient returns a new OpenAPI client that can be used to access the API from another API.

func (*Client) ControllerClient

func (c *Client) ControllerClient(ctx context.Context, resource metav1.Object) (*openapi.ClientWithResponses, error)

ControllerClient returns a new OpenAPI client that can be used to access the API from another controller. It requires a resource that stores the identity principal information.

func (*Client) HTTPClient

func (c *Client) HTTPClient(ctx context.Context) (*http.Client, error)

HTTPClient returns a new http client that will transparently do oauth2 header injection and refresh token updates.

type Options

type Options = coreclient.HTTPOptions

func NewOptions

func NewOptions() *Options

NewOptions must be used to create options for consistency.

Jump to

Keyboard shortcuts

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