client

package
v1.11.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIError

func APIError(err error) error

APIError makes API errors returned by the client presentable. The client's GenericOpenAPIError renders only the HTTP status text; the server's explanation is in the response body it carries.

func GetClient

func GetClient(
	serverAddress string,
	credential string,
	insecureTLS bool,
) (*kargogen.APIClient, error)

GetClient returns a client for the Kargo API server located at the specified address, authenticating with the specified credential if one is provided.

func GetClientFromConfig

func GetClientFromConfig(
	ctx context.Context,
	cfg config.CLIConfig,
	opts Options,
) (*kargogen.APIClient, error)

GetClientFromConfig returns a client for the Kargo API server located at the address specified in local configuration, using credentials also specified in the local configuration.

func GetWatchClient added in v1.8.8

func GetWatchClient(
	serverAddress string,
	credential string,
	insecureTLS bool,
) *watch.Client

GetWatchClient returns a new watch client for the Kargo API server located at the specified address.

func GetWatchClientFromConfig added in v1.8.8

func GetWatchClientFromConfig(
	ctx context.Context,
	cfg config.CLIConfig,
	opts Options,
) (*watch.Client, error)

GetWatchClientFromConfig returns a new watch client for the Kargo API server located at the address specified in local configuration, using credentials also specified in the local configuration.

Types

type Options

type Options struct {
	InsecureTLS bool
}

func (*Options) AddFlags

func (o *Options) AddFlags(flags *pflag.FlagSet)

AddFlags adds the flags for the client options to the provided flag set.

Jump to

Keyboard shortcuts

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