registry

package
v0.2.5 Latest Latest
Warning

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

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

Documentation

Overview

Package registry is used to register a distro

Index

Constants

This section is empty.

Variables

View Source
var ErrDistroModuleNotFound = errors.New("distro support not found")

ErrDistroModuleNotFound is used when a distro module is not found in the registry

Functions

func RegisterDistroModule

func RegisterDistroModule(mf MatchFunc, bf BuildFunc)

RegisterDistroModule takes a MatchFunc and BuildFunc and adds them to the registry of known distros.

Types

type BuildFunc

type BuildFunc = func() any

BuildFunc is a function returns a basic distro object

func GetDistroModuleBuilder

func GetDistroModuleBuilder(dis string) (BuildFunc, error)

GetDistroModuleBuilder returns a BuildFunc used to construct a distro object

type MatchFunc

type MatchFunc = func(id string) bool

MatchFunc is a function that takes in an id string and returns if it matches a the current distro

Jump to

Keyboard shortcuts

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