Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BestVersion ¶
func BestVersion(desired FacadeVersion, versions FacadeVersion) int
BestVersion finds the newest version in the version list that we can use.
func CompleteIntersection ¶
func CompleteIntersection(src, dest FacadeVersions) bool
CompleteIntersection returns true if the src and dest facades have a complete intersection. This means that the dest facades support all of the src facades. src is the facades that are required, dest is the full set of facades that are supported.
Types ¶
type FacadeVersion ¶
type FacadeVersion []int
FacadeVersion is a list of version numbers for a single facade.
type FacadeVersions ¶
type FacadeVersions map[string]FacadeVersion
FacadeVersions is a map of facade name to version numbers. The facade version numbers contain each version of the facade that the API server is capable of supporting. This supports having holes in the version numbers, so that we can depreciate broken versions of the facade.
func (FacadeVersions) Add ¶
func (f FacadeVersions) Add(others ...NamedFacadeVersion) FacadeVersions
Merge adds the other facade versions to the current facade versions.
type NamedFacadeVersion ¶
type NamedFacadeVersion struct { Name string Versions FacadeVersion }
NamedFacadeVersion is a map of facade name to version numbers.