vkern

package
v0.0.0-...-79a645e Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Performance   = Mode("perf")
	Compatibility = Mode("compat")
)

..

View Source
const ManifestName = "manifest"

ManifestName ..

Variables

View Source
var CLIUpdateInterval time.Duration = time.Hour * 24
View Source
var ErrInvalidCalVer = errors.New("invalid version string")

ErrInvalidCalVer ..

View Source
var Logger = func(fmt string, x ...interface{}) {
	return
}

Logger ..

Functions

func ConstructGetLastestKernelsFunc

func ConstructGetLastestKernelsFunc(ksrc *Manager) func(ctx context.Context) (CalVer, error)

ConstructGetLastestKernelsFunc : Given a Kernel Manager will construct a function that returns the latest Kernel Version

func IsCompatibilityKernel

func IsCompatibilityKernel(x Mode) bool

IsCompatibilityKernel ..

func KernelSuffix

func KernelSuffix(mode Mode) string

KernelSuffix ..

Types

type AdvancedArgs

type AdvancedArgs struct {
	Directory          string   `toml:"directory"`
	DropPath           string   `toml:"drop-path"`
	RemoteRepositories []string `toml:"remote-repositories"`
}

AdvancedArgs ..

type Bundle

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

Bundle ..

func NewBundle

func NewBundle(rs io.ReadSeeker) (*Bundle, error)

NewBundle ..

func (*Bundle) EarliestCompatibleCompiler

func (bundle *Bundle) EarliestCompatibleCompiler() string

EarliestCompatibleCompiler ..

func (*Bundle) Files

func (bundle *Bundle) Files() []BundleFileMetadata

Files ..

func (*Bundle) FilesList

func (bundle *Bundle) FilesList(tags ...string) []string

FilesList ..

func (*Bundle) Reader

func (bundle *Bundle) Reader(tags ...string) io.ReadCloser

Reader ..

func (*Bundle) Size

func (bundle *Bundle) Size(tags ...string) int64

Size ..

func (*Bundle) Version

func (bundle *Bundle) Version() CalVer

Version ..

type BundleFileMetadata

type BundleFileMetadata struct {
	Name string   `json:"name"`
	Size int64    `json:"size"`
	Tags []string `json:"tags,omitempty"`
}

BundleFileMetadata ..

type BundleMetadata

type BundleMetadata struct {
	Version                    CalVer               `json:"version"`
	EarliestCompatibleCompiler string               `json:"compiler"`
	Files                      []BundleFileMetadata `json:"files"`
}

BundleMetadata ..

func (*BundleMetadata) Marshal

func (metadata *BundleMetadata) Marshal() ([]byte, error)

Marshal ..

func (*BundleMetadata) Unmarshal

func (metadata *BundleMetadata) Unmarshal(data []byte) error

Unmarshal ..

type CLIArgs

type CLIArgs struct {
	Directory          string   `toml:"directory"`
	DropPath           string   `toml:"drop-path"`
	RemoteRepositories []string `toml:"remote-repositories"`
}

type CLIRemoteManager

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

func NewCLIRemoteManager

func NewCLIRemoteManager(url, dir string, logger elog.View) (*CLIRemoteManager, error)

func (*CLIRemoteManager) Get

func (mgr *CLIRemoteManager) Get(ctx context.Context, version CalVer) (*ManagedBundle, error)

func (*CLIRemoteManager) Latest

func (mgr *CLIRemoteManager) Latest() (out string, err error)

func (*CLIRemoteManager) List

func (mgr *CLIRemoteManager) List(ctx context.Context) (List, error)

type CalVer

type CalVer string

CalVer ..

func Parse

func Parse(s string) (CalVer, error)

Parse ..

func (CalVer) Less

func (v CalVer) Less(version CalVer) bool

Less ..

func (CalVer) LessEq

func (v CalVer) LessEq(version CalVer) bool

LessEq ..

func (CalVer) Major

func (v CalVer) Major() int

Major ..

func (CalVer) MarshalJSON

func (v CalVer) MarshalJSON() ([]byte, error)

MarshalJSON ..

func (CalVer) MarshalText

func (v CalVer) MarshalText() (text []byte, err error)

MarshalText ..

func (CalVer) Minor

func (v CalVer) Minor() int

Minor ..

func (CalVer) Modifier

func (v CalVer) Modifier() string

Modifier ..

func (CalVer) Month

func (v CalVer) Month() int

Month ..

func (CalVer) Patch

func (v CalVer) Patch() int

Patch ..

func (CalVer) String

func (v CalVer) String() string

String ..

func (*CalVer) UnmarshalJSON

func (v *CalVer) UnmarshalJSON(data []byte) error

UnmarshalJSON ..

func (*CalVer) UnmarshalText

func (v *CalVer) UnmarshalText(text []byte) error

UnmarshalText ..

func (CalVer) Year

func (v CalVer) Year() int

Year ..

type CalVers

type CalVers []CalVer

CalVers ..

func (CalVers) BestMatch

func (a CalVers) BestMatch(v CalVer) (CalVer, error)

BestMatch ..

func (CalVers) Len

func (a CalVers) Len() int

func (CalVers) Less

func (a CalVers) Less(i, j int) bool

func (CalVers) Swap

func (a CalVers) Swap(i, j int)

type CompoundManager

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

CompoundManager ..

func NewCompoundManager

func NewCompoundManager(mgrs ...Manager) (*CompoundManager, error)

NewCompoundManager ..

func (*CompoundManager) Get

func (mgr *CompoundManager) Get(ctx context.Context, version CalVer) (*ManagedBundle, error)

Get ..

func (*CompoundManager) Latest

func (mgr *CompoundManager) Latest() (string, error)

Latest ..

func (*CompoundManager) List

func (mgr *CompoundManager) List(ctx context.Context) (List, error)

List ..

type List

type List []Tuple

List ..

func (List) BestMatch

func (l List) BestMatch(v CalVer) (*Tuple, error)

BestMatch ..

func (List) Len

func (l List) Len() int

func (List) Less

func (l List) Less(i, j int) bool

func (List) Swap

func (l List) Swap(i, j int)

type LocalManager

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

LocalManager ..

func NewLocalManager

func NewLocalManager(path string) (*LocalManager, error)

NewLocalManager ..

func (*LocalManager) Close

func (mgr *LocalManager) Close() error

Close ..

func (*LocalManager) Get

func (mgr *LocalManager) Get(ctx context.Context, version CalVer) (*ManagedBundle, error)

Get ..

func (*LocalManager) Latest

func (mgr *LocalManager) Latest() (string, error)

Latest ..

func (*LocalManager) List

func (mgr *LocalManager) List(ctx context.Context) (List, error)

List ..

type ManagedBundle

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

ManagedBundle ..

func (*ManagedBundle) Bundle

func (bundle *ManagedBundle) Bundle() *Bundle

Bundle ..

func (*ManagedBundle) Close

func (bundle *ManagedBundle) Close() error

Close ..

func (*ManagedBundle) Location

func (bundle *ManagedBundle) Location() string

Location ..

type Manager

type Manager interface {
	Get(ctx context.Context, version CalVer) (*ManagedBundle, error)
	List(ctx context.Context) (List, error)
	Latest() (string, error)
}

Manager ..

var Global Manager

Global ..

func Advanced

func Advanced(args AdvancedArgs) (Manager, error)

Advanced ..

func CLI

func CLI(args CLIArgs, logger elog.View) (Manager, error)

type Mode

type Mode string

Mode ..

type RemoteManager

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

RemoteManager ..

func NewRemoteManager

func NewRemoteManager(url, dir string) (*RemoteManager, error)

NewRemoteManager ..

func (*RemoteManager) Close

func (mgr *RemoteManager) Close() error

Close ..

func (*RemoteManager) Get

func (mgr *RemoteManager) Get(ctx context.Context, version CalVer) (*ManagedBundle, error)

Get ..

func (*RemoteManager) Latest

func (mgr *RemoteManager) Latest() (string, error)

Latest ..

func (*RemoteManager) List

func (mgr *RemoteManager) List(ctx context.Context) (List, error)

List ..

type Tuple

type Tuple struct {
	Idx      int
	Version  CalVer    `json:"version"`
	Location string    `json:"source"`
	ModTime  time.Time `json:"release"`
}

Tuple ..

Jump to

Keyboard shortcuts

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