version

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

The release version is defined here.

Index

Constants

View Source
const Channel = "default"

Hardcoded (for now) channel value for wireleap client.

Variables

View Source
var BUILD_FLAGS string
View Source
var BUILD_TIME string
View Source
var GITREV string = "0.0.0-UNSET-VERSION"

old name compat

View Source
var GIT_COMMIT string
View Source
var MIGRATIONS = []*upgrade.Migration{
	{
		Name:    "restructuring_config",
		Version: semver.Version{Major: 0, Minor: 6, Patch: 0},
		Apply: func(f fsdir.T) error {
			var oldc map[string]interface{}
			if err := f.Get(&oldc, "config.json.next"); err != nil {
				return fmt.Errorf("could not load config.json.next: %s", err)
			}
			c := clientcfg.Defaults()

			if ak, ok := oldc["accesskey"].(clientcfg.Accesskey); ok {
				c.Broker.Accesskey = ak
			}

			if circ, ok := oldc["circuit"].(clientcfg.Circuit); ok {
				c.Broker.Circuit = circ
			}

			if timeout, ok := oldc["timeout"].(duration.T); ok {
				c.Broker.Circuit.Timeout = timeout
			}

			if c.Broker.Circuit.Whitelist == nil {
				c.Broker.Circuit.Whitelist = make([]string, 0)
			}

			if err := f.Set(&c, "config.json.next"); err != nil {
				return fmt.Errorf("could not save config.json.next: %s", err)
			}
			log.Println("NOTE: ports used by Wireleap client have changed as follows:")
			log.Println("h2c:    13492 -> 13490")
			log.Println("socks5: 13491 (no change)")
			log.Println("tun:    13493 -> 13492")
			log.Println("If you have been depending on the old values please change the configuration accordingly.")
			return nil
		},
		Rollback: func(fsdir.T) error {

			return nil
		},
	},
}

MIGRATIONS is the slice of versioned migrations.

VERSION is the semver version struct of VERSION_STRING.

View Source
var VERSION_STRING = GITREV

VERSION_STRING is the current version string, set by the linker via go build -X flag.

Functions

func LatestChannelVersion

func LatestChannelVersion(f fsdir.T) (_ semver.Version, err error)

LatestChannelVersion is a special function for wireleap which will obtain the latest version supported by the currently configured update channel from the directory. NOTE: since wireleap is not running, we need to check status out of band.

func PostRollbackHook

func PostRollbackHook(f fsdir.T) (err error)

Post-rollback hook for rollbackcmd.

func PostUpgradeHook

func PostUpgradeHook(f fsdir.T) (err error)

Post-upgrade hook for superviseupgradecmd.

Types

This section is empty.

Jump to

Keyboard shortcuts

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