registry

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package registry provides a registry for configuration documents.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotRegistered indicates that the manifest kind is not registered.
	ErrNotRegistered = errors.New("not registered")
	// ErrExists indicates that the manifest is already registered.
	ErrExists = errors.New("exists")
)

Functions

func New

func New(kind, version string) (config.Document, error)

New creates a new instance of the requested manifest.

func Register

func Register(kind string, f NewDocumentFunc)

Register registers a manifests with the registry.

Types

type NewDocumentFunc

type NewDocumentFunc func(version string) config.Document

NewDocumentFunc represents a function that creates a new document by version.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry represents the document kind/version registry.

Jump to

Keyboard shortcuts

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