params

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 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 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() *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)

NewFollower 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