Documentation
¶
Index ¶
- type Params
- func (p *Params) AddFlags(flags *pflag.FlagSet)
- func (p *Params) ClientSet() (kubernetes.Interface, error)
- func (p *Params) Namespace() string
- func (p *Params) NewFollower(ctx context.Context, br types.NamespacedName, ...) (*follower.Follower, error)
- func (p *Params) NewPodWatcher(ctx context.Context) (*reactor.PodWatcher, error)
- func (p *Params) RESTConfig() (*rest.Config, error)
- func (p *Params) RequestTimeout() (time.Duration, error)
- func (p *Params) ShipwrightClientSet() (buildclientset.Interface, error)
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) ClientSet ¶
func (p *Params) ClientSet() (kubernetes.Interface, error)
ClientSet returns a kubernetes clientset.
func (*Params) Namespace ¶
Namespace returns kubernetes namespace with alle 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
NewFollower instantiate a new PodWatcher based on the current instance.
func (*Params) RESTConfig ¶ added in v0.8.0
RESTConfig returns the rest configuration based on local flags.
func (*Params) RequestTimeout ¶ added in v0.6.0
RequestTimeout returns the setting from k8s --request-timeout param
func (*Params) ShipwrightClientSet ¶
func (p *Params) ShipwrightClientSet() (buildclientset.Interface, error)
ShipwrightClientSet returns a Shipwright Clientset