acp

package
v0.0.0-...-58f6e79 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBaseURL = "http://127.0.0.1:8100"

	FeatureSnapshotRestore      = "SnapshotRestore"
	FeatureSnapshotMirrorUpdate = "SnapshotMirrorUpdate"
	FeatureReadOnlyClone        = "ReadOnlyClone"
	FeatureInflightEncryption   = "InflightEncryption"
)

Variables

This section is empty.

Functions

func Initialize

func Initialize(url string, enabled bool, timeout time.Duration)

Initialize creates a singleton Trident-ACP API instance. This should only be called once during startup.

func SetAPI

func SetAPI(acp TridentACP)

SetAPI should only be used for testing. It enables testing by replacing the package-level Trident-ACP API with a mock ACP API. This should not be used anywhere outside unit tests.

Types

type REST

type REST interface {
	GetVersion(context.Context) (*version.Version, error)
	Entitled(context.Context, string) error
}

REST is a set of methods for interacting with Trident-ACP REST APIs.

type TridentACP

type TridentACP interface {
	Enabled() bool
	GetVersion(context.Context) (*version.Version, error)
	GetVersionWithBackoff(context.Context) (*version.Version, error)
	IsFeatureEnabled(context.Context, string) error
}

TridentACP is a set of methods for exposing Trident-ACP REST APIs to Trident.

func API

func API() TridentACP

API returns a singleton Trident-ACP API client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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