core

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IKernelContext

type IKernelContext interface {
	Validate(stepName string) error
}

func NewKernelContext

func NewKernelContext() IKernelContext

type IPipeline

type IPipeline interface {
	Run() error
}

type IPipelineBuilder

type IPipelineBuilder interface {
	WithStep(stepName string) IPipelineBuilder
	WithDefault() IPipelineBuilder
	Build() IPipeline
}

type IStep

type IStep interface {
	Name() string
	// NeedParams() []string // TODO: simpler way?
	// This serves for the use case of when I only want
	// to run a set of steps. And for those steps if I have
	// not defined the required kernel context parameters
	// then it should warn the users. Speficy in the command
	// line arguments or prompt the user? What is more suckless
	Execute() error
}

type IStepFactory

type IStepFactory interface {
	AvailableSteps() []string
	CreateStep(name string, log logger.ILogger, ctx IKernelContext) (IStep, error)
}

type KernelContext

type KernelContext struct {
	TarballURL    string
	DownloadPath  string
	ArchivePath   string
	Directory     string
	SignatureURL  string
	ConfigOptions []string
	OldConfigPath string
	Initramfs     string
	Bootloader    string
	NumJobs       int
}

func (*KernelContext) Validate

func (c *KernelContext) Validate(stepName string) error

type Pipeline

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

func (*Pipeline) Run

func (pl *Pipeline) Run() error

type PipelineBuilder

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

func (*PipelineBuilder) Build

func (b *PipelineBuilder) Build() IPipeline

func (*PipelineBuilder) WithDefault

func (b *PipelineBuilder) WithDefault() IPipelineBuilder

func (*PipelineBuilder) WithStep

func (b *PipelineBuilder) WithStep(stepName string) IPipelineBuilder

Jump to

Keyboard shortcuts

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