params

package
v0.19.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options added in v0.19.0

type Options func(params *Params)

Options accepts optional functions to override certain parameters

func WithClientset added in v0.19.0

func WithClientset(kubeClientset kubernetes.Interface, buildClientset buildclientset.Interface) Options

WithClientset updates the shp CLI to use the provided Kubernetes and Build clientsets

func WithConfigFlags added in v0.19.0

func WithConfigFlags(configFlags *genericclioptions.ConfigFlags) Options

WithConfigFlags updates the shp CLI to use the provided configuration flags

func WithNamespace added in v0.19.0

func WithNamespace(namespace string) Options

WithNamespace updates the shp CLI to use the provided namespace

type Params

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

Params is a place for Shipwright CLI to store its runtime parameters, including configured dynamic client and global flags.

func NewParams

func NewParams(options ...Options) *Params

NewParams creates a new instance of ShipwrightParams and returns it as an interface value

func NewParamsForTest

func NewParamsForTest(clientset kubernetes.Interface,
	shpClientset buildclientset.Interface,
	configFlags *genericclioptions.ConfigFlags,
	namespace string,
	failPollInterval *time.Duration,
	failPollTimeout *time.Duration,

) *Params

NewParamsForTest creates an instance of Params for testing purpose

func (*Params) AddFlags

func (p *Params) AddFlags(flags *pflag.FlagSet)

AddFlags accepts flags and adds program global flags to it

func (*Params) ClientSet

func (p *Params) ClientSet() (kubernetes.Interface, error)

ClientSet returns a kubernetes clientset.

func (*Params) Namespace

func (p *Params) Namespace() string

Namespace returns kubernetes namespace with all the overrides from command line and kubernetes config

func (*Params) NewFollower added in v0.8.0

func (p *Params) NewFollower(
	ctx context.Context,
	br types.NamespacedName,
	ioStreams *genericclioptions.IOStreams,
) (*follower.Follower, error)

NewFollower instantiate a new Follower based on the current instance.

func (*Params) NewPodWatcher added in v0.8.0

func (p *Params) NewPodWatcher(ctx context.Context) (*reactor.PodWatcher, error)

NewPodWatcher instantiate a new PodWatcher based on the current instance.

func (*Params) RESTConfig added in v0.8.0

func (p *Params) RESTConfig() (*rest.Config, error)

RESTConfig returns the rest configuration based on local flags.

func (*Params) RequestTimeout added in v0.6.0

func (p *Params) RequestTimeout() (time.Duration, error)

RequestTimeout returns the setting from k8s --request-timeout param

func (*Params) ShipwrightClientSet

func (p *Params) ShipwrightClientSet() (buildclientset.Interface, error)

ShipwrightClientSet returns a Shipwright Clientset

Jump to

Keyboard shortcuts

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