cmd

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const KubectlFbReleaseURL = "https://api.github.com/repos/FoundationDB/fdb-kubernetes-operator/releases/latest"

KubectlFbReleaseURL is the public GitHub URL we read the latest version from

View Source
const LocalTempVersionFileName = "kubectl-fdb-version.txt"

LocalTempVersionFileName is where we cache plugin version for 24 hours, so we don't call GitHub for every single command(also rate-limit issue on GitHub api calls)

Variables

This section is empty.

Functions

func NewRootCmd added in v0.26.0

func NewRootCmd(streams genericclioptions.IOStreams, pluginVersionChecker VersionChecker) *cobra.Command

NewRootCmd provides a cobra command wrapping FDB actions

Types

type PluginVersionDetails added in v1.29.0

type PluginVersionDetails struct {
	ID      int64  `json:"id"`
	Version string `json:"tag_name"`
	Name    string `json:"name"`
}

PluginVersionDetails Contains [partial] plugin version details from GitHub

type RealVersionChecker added in v1.29.0

type RealVersionChecker struct{}

RealVersionChecker will do actual call to GitHub API to get version

type VersionChecker added in v1.29.0

type VersionChecker interface {
	// contains filtered or unexported methods
}

VersionChecker interface to help us mock test the version checker

Jump to

Keyboard shortcuts

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