Documentation ¶
Index ¶
- func CheckAndLogRunE() cobrautil.CobraRunFunc
- func CheckIsLatestVersion(ctx context.Context, getCurrentVersion func() (string, error), ...) (SoftwareUpdateState, string, *Release, error)
- func CurrentVersion() (string, error)
- func GetSourceRepository() string
- func RegisterFlags(flagset *flag.FlagSet)
- type Release
- type SoftwareUpdateState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAndLogRunE ¶
func CheckAndLogRunE() cobrautil.CobraRunFunc
CheckAndLogRunE is a run function that checks if the current version of SpiceDB is the latest and, if not, logs a warning. This check is disabled by setting --skip-release-check=false.
func CheckIsLatestVersion ¶
func CheckIsLatestVersion( ctx context.Context, getCurrentVersion func() (string, error), getLatestRelease func(context.Context) (*Release, error), ) (SoftwareUpdateState, string, *Release, error)
CheckIsLatestVersion returns whether the current version of the software is the latest released. Returns the state, as well as the latest release.
func CurrentVersion ¶
CurrentVersion returns the current version of the binary.
func GetSourceRepository ¶ added in v1.20.0
func GetSourceRepository() string
GetSourceRepository returns the source repository path for SpiceDB.
func RegisterFlags ¶
RegisterFlags registers the flags for the CheckAndLogRunE function.
Types ¶
type Release ¶
type Release struct { // Version is the version of the release. Version string // PublishedAt is when the release was published, in UTC. PublishedAt time.Time // ViewURL is the URL at which the release can be viewed. ViewURL string }
Release represents a release of SpiceDB.
type SoftwareUpdateState ¶
type SoftwareUpdateState int
SoftwareUpdateState is the state of this software relative to whether updates are available.
const ( // Unknown indicates an unknown state. Unknown SoftwareUpdateState = iota // UnreleasedVersion indicates that the current software version running is an unreleased version. UnreleasedVersion // UpdateAvailable indicates an update is available. UpdateAvailable // UpToDate indicates that the software is fully up-to-date. UpToDate )