Documentation ¶
Index ¶
Constants ¶
const ( Unknown tristate = iota Present Absent )
Variables ¶
This section is empty.
Functions ¶
func CreateBaseFingerPrint ¶
CreateBaseFingerPrint returns a base fingerprint
func CreateFingerPrint ¶
CreateFingerPrint creates a fingerprint from the specific strings.
Types ¶
type Pkg ¶
type Pkg struct { // unique key: ReleaseName string // Release name, or default chart release-name Version string // sem ver (without a range) Namespace string // Installed ns, or default chart namespace ChartName string // chart name DependsRel []*PkgRel // list of dependencies' fingerprints DependsOptionalRel []*PkgRel // list of optional dependencies' fingerprints Repository string // repository where to find ChartName ParentChartPath string // Absolute path of parent chart, if existing CurrentState tristate // current state of the package DesiredState tristate // desired state of the package PinnedVer tristate // if we have a pinnedVer or not in pkg.Version }
Pkg is the minimum object the solver reasons about. Note that each package is unique. The same chart, with the same default release name & ns, but different version, is a different package. E.g: prometheus-1.2.0 and prometheus-1.3.0 are different packages.
func NewPkg ¶
func NewPkg(relName, chartName, version, namespace string, currentState, desiredState, pinnedVer tristate, repo, parentChartPath string) *Pkg
NewPkg creates a new Pkg struct. It does not give value to DependsRel, DependsOptionalRel.
func NewPkgMock ¶
func NewPkgMock(name, version, namespace string, depends, dependsOptional []*PkgRel, currentState, desiredState tristate) *Pkg
NewPkgMock creates a new package. Useful for testing.
func (*Pkg) GetBaseFingerPrint ¶
GetBaseFingerPrint returns a unique id of the package minus version. This helps when filtering packages to find those that are similar and differ only in the version.
func (*Pkg) GetFingerPrint ¶
GetFingerPrint returns a unique id of the package.