feature

package
v0.17.0 Latest Latest
Warning

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

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

Documentation

Overview

Package feature tracks features that are supported by Kopia client to ensure forwards and backwards compatibility.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Behavior

type Behavior string

Behavior specifies how kopia should behave if it encounters a Feature it does not understand.

type Feature

type Feature string

Feature identifies a feature that particular Kopia client must understand.

type IfNotUnderstood

type IfNotUnderstood struct {
	Warn             bool   `json:"warn"`                       // warn instead of failing
	Message          string `json:"message,omitempty"`          // message to show to users
	URL              string `json:"url,omitempty"`              // URL to show to users
	UpgradeToVersion string `json:"upgradeToVersion,omitempty"` // suggest upgrading to a particular version
}

IfNotUnderstood describes the behavior of Kopia when a required feature is not understood.

type Required

type Required struct {
	Feature         Feature         `json:"feature"`
	IfNotUnderstood IfNotUnderstood `json:"ifNotUnderstood"`
}

Required describes a single required feature that a client must understand along with desired behavior when not understood.

func GetUnsupportedFeatures

func GetUnsupportedFeatures(required []Required, supported []Feature) []Required

GetUnsupportedFeatures compares the provided list of required features to the list of supported features and returns the list of []RequireFeature that are not supported.

func (Required) UnsupportedMessage

func (r Required) UnsupportedMessage() string

UnsupportedMessage returns a message to display to users if the feature is unsupported.

Jump to

Keyboard shortcuts

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