kernel

package
v0.2.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmdline

type Cmdline struct {
	sync.Mutex
	Parameters
}

Cmdline represents a set of kernel parameters.

func NewCmdline

func NewCmdline(parameters string) *Cmdline

NewCmdline initializes and returns a representation of the cmdline values specified by `parameters`. nolint: golint

func NewDefaultCmdline

func NewDefaultCmdline() *Cmdline

NewDefaultCmdline returns a set of kernel parameters that serve as the base for all Talos installations. nolint: golint

func ProcCmdline added in v0.2.0

func ProcCmdline() *Cmdline

Cmdline returns a representation of /proc/cmdline. nolint: golint

func (*Cmdline) Append added in v0.2.0

func (c *Cmdline) Append(k string, v string)

Append appends a kernel parameter.

func (*Cmdline) AppendAll added in v0.2.0

func (c *Cmdline) AppendAll(args []string) error

AppendAll appends a set of kernel parameters.

func (*Cmdline) AppendDefaults added in v0.2.0

func (c *Cmdline) AppendDefaults()

AppendDefaults add the Talos default kernel commandline options to the existing set

func (*Cmdline) Bytes added in v0.2.0

func (c *Cmdline) Bytes() []byte

Bytes returns the byte slice representation of the cmdline struct.

func (*Cmdline) Get added in v0.2.0

func (c *Cmdline) Get(k string) (value *Parameter)

Get gets a kernel parameter.

func (*Cmdline) Set added in v0.2.0

func (c *Cmdline) Set(k string, v *Parameter)

Set sets a kernel parameter.

type Key

type Key = string

Key represents a key in a kernel parameter key-value pair.

type Parameter

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

Parameter represents a value in a kernel parameter key-value pair.

func NewParameter

func NewParameter(k string) *Parameter

NewParameter initializes and returns a Parameter.

func (*Parameter) Append

func (v *Parameter) Append(s string) *Parameter

Append appends a string to a value's internal representation.

func (*Parameter) Contains

func (v *Parameter) Contains(s string) (ok bool)

Contains returns a boolean indicating the existence of a value.

func (*Parameter) First

func (v *Parameter) First() *string

First attempts to return the first string of a value's internal representation.

func (*Parameter) Get

func (v *Parameter) Get(idx int) *string

Get attempts to get a string from a value's internal representation.

func (*Parameter) Key

func (v *Parameter) Key() string

Key returns the value's key.

type Parameters

type Parameters []*Parameter

Parameters represents /proc/cmdline.

func (Parameters) String

func (p Parameters) String() string

String returns a string representation of all parameters.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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