Documentation ¶
Overview ¶
Package version provides a wrapper around github.com/hashicorp/go-version that provides additional functions on top of Percona's version service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matrix ¶
type Matrix struct { Backup map[string]*everestv1alpha1.Component `json:"backup"` Mongod map[string]*everestv1alpha1.Component `json:"mongod"` PXC map[string]*everestv1alpha1.Component `json:"pxc"` ProxySQL map[string]*everestv1alpha1.Component `json:"proxysql"` HAProxy map[string]*everestv1alpha1.Component `json:"haproxy"` LogCollector map[string]*everestv1alpha1.Component `json:"logCollector"` Postgresql map[string]*everestv1alpha1.Component `json:"postgresql"` PGBackRest map[string]*everestv1alpha1.Component `json:"pgbackrest"` PGBouncer map[string]*everestv1alpha1.Component `json:"pgbouncer"` }
Matrix represents the response from the version service.
type Response ¶
type Response struct { Versions []struct { Matrix Matrix `json:"matrix"` } `json:"versions"` }
Response is a response model for version service response parsing.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service used for the integration with Percona Version Service.
func NewVersionService ¶
func NewVersionService() *Service
NewVersionService creates a version service client.
func (*Service) GetVersions ¶
func (v *Service) GetVersions(engineType everestv1alpha1.EngineType, operatorVersion string) (*Matrix, error)
GetVersions returns a matrix of available versions for a database engine.
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
Version is a wrapper around github.com/hashicorp/go-version that adds additional functions for developer's usability.
func NewVersion ¶
NewVersion creates a new version from given string.
func (*Version) ToAPIVersion ¶
ToAPIVersion returns version that can be used as K8s APIVersion parameter.
func (*Version) ToCRVersion ¶
ToCRVersion returns version usable as CRversion parameter.
func (*Version) ToK8sVersion ¶ added in v1.0.0
ToK8sVersion returns a version that can be used in the CR's GVK.