client

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(
	serverAddress string,
	credential string,
	insecureTLS bool,
) svcv1alpha1connect.KargoServiceClient

GetClient returns a new client for the Kargo API server located at the specified address. If the provided credential is non-empty, the client will be decorated with an interceptor that adds the credential to outbound requests.

func GetClientFromConfig

func GetClientFromConfig(
	ctx context.Context,
	cfg config.CLIConfig,
	opts Options,
) (
	svcv1alpha1connect.KargoServiceClient,
	error,
)

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

func IsConfigNotFoundErr

func IsConfigNotFoundErr(err error) bool

Types

type Options added in v0.5.0

type Options struct {
	InsecureTLS bool
}

func (*Options) AddFlags added in v0.5.0

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