meta

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const EnvNameV0 = "TIUP_USE_V0"

EnvNameV0 is the name of the env var used to direct TiUp to use old manifests.

Variables

This section is empty.

Functions

func Mirror

func Mirror() string

Mirror return mirror of tiup. If it's not defined, it will use "https://tiup-mirrors.pingcap.com/".

func ParseCompVersion

func ParseCompVersion(spec string) (string, v0manifest.Version)

ParseCompVersion parses component part from <component>[:version] specification

Types

type Environment added in v1.0.0

type Environment struct {
	// contains filtered or unexported fields
}

Environment is the user's fundamental configuration including local and remote parts.

func InitEnv added in v1.0.0

func InitEnv(options repository.Options) (*Environment, error)

InitEnv creates a new Environment object configured using env vars and defaults. Uses the EnvNameV0 env var to determine whether to use v0 or v1 manifests.

func NewV0 added in v1.0.0

func NewV0(profile *localdata.Profile, repo *repository.Repository) *Environment

NewV0 creates a new Environment with the provided data. Note that environments created with this function do not support v1 repositories.

func (*Environment) BinaryPath added in v1.0.0

func (env *Environment) BinaryPath(component string, version v0manifest.Version) (string, error)

BinaryPath return the installed binary path.

func (*Environment) Close added in v1.0.0

func (env *Environment) Close() error

Close release resource of env.

func (*Environment) DownloadComponentIfMissing added in v1.0.0

func (env *Environment) DownloadComponentIfMissing(component string, version v0manifest.Version) (v0manifest.Version, error)

DownloadComponentIfMissing downloads the specific version of a component if it is missing

func (*Environment) GetComponentInstalledVersion added in v1.0.0

func (env *Environment) GetComponentInstalledVersion(component string, version v0manifest.Version) (v0manifest.Version, error)

GetComponentInstalledVersion return the installed version of component.

func (*Environment) IsSupportedComponent added in v1.0.0

func (env *Environment) IsSupportedComponent(component string) bool

IsSupportedComponent return true if support if platform support the component.

func (*Environment) LocalPath added in v1.0.0

func (env *Environment) LocalPath(path ...string) string

LocalPath returns the local path absolute path

func (*Environment) PlatformString added in v1.0.0

func (env *Environment) PlatformString() string

PlatformString returns a string identifying the current system.

func (*Environment) Profile added in v1.0.0

func (env *Environment) Profile() *localdata.Profile

Profile returns the profile of local data

func (*Environment) Repository added in v1.0.0

func (env *Environment) Repository() *repository.Repository

Repository returns the initialized repository

func (*Environment) SelectInstalledVersion added in v1.0.0

func (env *Environment) SelectInstalledVersion(component string, version v0manifest.Version) (v0manifest.Version, error)

SelectInstalledVersion selects the installed versions and the latest release version will be chosen if there is an empty version

func (*Environment) SelfUpdate added in v1.0.0

func (env *Environment) SelfUpdate() error

SelfUpdate updates TiUp.

func (*Environment) SetProfile added in v1.0.0

func (env *Environment) SetProfile(p *localdata.Profile)

SetProfile exports for test

func (*Environment) UpdateComponents added in v1.0.0

func (env *Environment) UpdateComponents(specs []string, nightly, force bool) error

UpdateComponents updates or installs all components described by specs.

func (*Environment) V1Repository added in v1.0.0

func (env *Environment) V1Repository() *repository.V1Repository

V1Repository returns the initialized v1 repository

Jump to

Keyboard shortcuts

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