versionservice

package
v1.2.0-rc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package versionservice provides an interface for the Perocona version service.

Index

Constants

View Source
const (
	// PXCOperatorName is the name of the PXC operator in the version service.
	PXCOperatorName = "pxc-operator"
	// PSMDBOperatorName is the name of the PSMDB operator in the version service.
	PSMDBOperatorName = "psmdb-operator"
	// PGOperatorName is the name of the PG operator in the version service.
	PGOperatorName = "pg-operator"
)

Variables

EngineTypeToOperatorName maps an engine type to the operator name in the version service.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	GetSupportedEngineVersions(ctx context.Context, operator, version string) ([]string, error)
	GetEverestMetadata(ctx context.Context) (*perconavs.MetadataResponse, error)
}

Interface is the interface for the version service client.

func New

func New(url string) Interface

New returns a new version service client.

type MockInterface

type MockInterface struct {
	mock.Mock
}

MockInterface is an autogenerated mock type for the Interface type

func NewMockInterface

func NewMockInterface(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockInterface

NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockInterface) GetEverestMetadata

func (_m *MockInterface) GetEverestMetadata(ctx context.Context) (*version.MetadataResponse, error)

GetEverestMetadata provides a mock function with given fields: ctx

func (*MockInterface) GetSupportedEngineVersions

func (_m *MockInterface) GetSupportedEngineVersions(ctx context.Context, operator string, _a2 string) ([]string, error)

GetSupportedEngineVersions provides a mock function with given fields: ctx, operator, _a2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL