Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wrapper ¶
type Wrapper struct { Host *sunpikev1alpha1.Host // contains filtered or unexported fields }
Wrapper struct encapsulates api.Host object to simplify sunpike communication
func InitOrGetSunpikeClient ¶
func InitOrGetSunpikeClient(phases []phases.PhaseInterface, cfg config.Config, hostSpec sunpikev1alpha1.HostSpec) (*Wrapper, error)
InitOrGetSunpikeClient returns an instance of the sunpike.Wrapper
cfg contains the configuration needed to setup the Sunpike client, such as transport URL and the connection timeout. hostSpec on the other hand is optional and is what this Sunpike client will send to Nodelet as the Spec as part of the status update.
The idea is to also incorporate the settings of cfg into the HostSpec. After merging those we can remove the need for the cfg argument. TODO merge cfg and hostSpec at some point
func (*Wrapper) GetOrderForPhaseName ¶
GetOrderForPhaseName is a convenience function to convert phase name to phase order This function is needed because pre-sunpike nodelet was entirely using phase names for UI simplicity. The new data model however uses phase order since it is a unique identifier
func (*Wrapper) Update ¶
func (c *Wrapper) Update(ctx context.Context, extnData extensionfile.ExtensionData) (*sunpikev1alpha1.Host, error)
Update is a convenience function to convert extension data into api.Host object and report it to sunpike