Documentation ¶
Overview ¶
Package goes, combined with a compatibly configured Linux kernel, provides a monolithic embedded system.
Index ¶
- Constants
- Variables
- func Replace(s, name string) string
- func Usage(v Usager) string
- type Blocker
- type Function
- type Goes
- func (g *Goes) Apropos() lang.Alt
- func (g *Goes) Builtins() map[string]func(...string) error
- func (g *Goes) Complete(args ...string) (completions []string)
- func (g *Goes) Fork(args ...string) *exec.Cmd
- func (g *Goes) Goes(parent *Goes)
- func (g *Goes) Help(args ...string) string
- func (g *Goes) Main(args ...string) error
- func (g *Goes) MakeListFunc(pipeline []piperun) (func(stdin io.Reader, stdout io.Writer, stderr io.Writer) error, error)
- func (g *Goes) MakePipefun(pipeline []func(io.Reader, io.Writer, io.Writer) error, closers *[]io.Closer) (func(io.Reader, io.Writer, io.Writer) error, error)
- func (g *Goes) Man() lang.Alt
- func (g *Goes) Names() []string
- func (g *Goes) Path() []string
- func (g *Goes) ProcessCommand(cl shellutils.Cmdline, closers *[]io.Closer) (func(stdin io.Reader, stdout io.Writer, stderr io.Writer) error, error)
- func (g *Goes) ProcessList(ls shellutils.List) (*shellutils.List, *shellutils.Word, ...)
- func (g *Goes) ProcessPipeline(ls shellutils.List) (*shellutils.List, *shellutils.Word, ...)
- func (g *Goes) String() string
- func (g *Goes) Usage() string
- type Usager
Constants ¶
View Source
const ( VerboseQuiet = iota VerboseVerify VerboseDebug )
Variables ¶
View Source
var ( Stop chan struct{} WG sync.WaitGroup )
All goes go-routines should add them selves to the WG WaitGroup and quit on Stop like this,
goes.WG.Add(1) go func() { defer goes.WG.Done() for { select { case <-goes.Stop: return default: ... } } }
Functions ¶
Types ¶
type Goes ¶
type Goes struct { // These uppercased fields may/should be assigned at instantiation NAME, USAGE string APROPOS, MAN lang.Alt ByName map[string]cmd.Cmd Catline io.ReadWriter Status error Verbosity int EnvMap map[string]string FunctionMap map[string]Function // contains filtered or unexported fields }
func (*Goes) Fork ¶
Fork returns an exec.Cmd ready to Run or Output this program with the given args.
func (*Goes) Main ¶
Run a command in the current context.
If len(args) == 1 and args[0] doesn't match a mapped command, this will run the "cli".
If the args has "-help", or "--help", this runs ByName("help").Main(args...) to print text.
Similarly for "-apropos", "-complete", "-man", and "-usage".
If the command is a daemon, this fork exec's itself twice to disassociate the daemon from the tty and initiating process.
func (*Goes) MakeListFunc ¶
func (*Goes) MakePipefun ¶
func (*Goes) ProcessCommand ¶
func (*Goes) ProcessList ¶
func (g *Goes) ProcessList(ls shellutils.List) (*shellutils.List, *shellutils.Word, func(stdin io.Reader, stdout io.Writer, stderr io.Writer) error, error)
func (*Goes) ProcessPipeline ¶
func (g *Goes) ProcessPipeline(ls shellutils.List) (*shellutils.List, *shellutils.Word, func(io.Reader, io.Writer, io.Writer) error, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cli/internal/liner
Package liner is a wrapper to Peter Harris' <pharris@opentext.com> "Go line editor" <github.com:peterh/liner>.
|
Package liner is a wrapper to Peter Harris' <pharris@opentext.com> "Go line editor" <github.com:peterh/liner>. |
cli/internal/notliner
Package notliner provides an alternative command.Prompter for shell scripts and tty's unsupported by liner.
|
Package notliner provides an alternative command.Prompter for shell scripts and tty's unsupported by liner. |
dhcpcd
Package dhcpcd is a simple dhcp client
|
Package dhcpcd is a simple dhcp client |
gpio
Package gpio provides cli command to query/configure GPIO pins.
|
Package gpio provides cli command to query/configure GPIO pins. |
i2c
Package i2c provides cli command to access i2c devices.
|
Package i2c provides cli command to access i2c devices. |
i2cd
Package ucd9090 provides access to the UCD9090 Power Sequencer/Monitor chip
|
Package ucd9090 provides access to the UCD9090 Power Sequencer/Monitor chip |
ip/internal/group
Cache parse of /etc/iproute2/group
|
Cache parse of /etc/iproute2/group |
ip/route/show
ip route show (default) | flush | get | save | restore
|
ip route show (default) | flush | get | save | restore |
platina/mk1/toggle
Package ucd9090 provides access to the UCD9090 Power Sequencer/Monitor chip
|
Package ucd9090 provides access to the UCD9090 Power Sequencer/Monitor chip |
redisd
Package redisd provides a redis server daemon that is started by /sbin/init or /usr/sbin/goesd *before* all other daemons.
|
Package redisd provides a redis server daemon that is started by /sbin/init or /usr/sbin/goesd *before* all other daemons. |
reload
Package reload provides the named command that sends SIGHUP to all of the daemons associated with this executable.
|
Package reload provides the named command that sends SIGHUP to all of the daemons associated with this executable. |
sshd
Package sshd is a ssh server daemon
|
Package sshd is a ssh server daemon |
start
Package start provides the named command that runs a redis server followed by all of the configured daemons.
|
Package start provides the named command that runs a redis server followed by all of the configured daemons. |
stop
Package stop provides the named command that kills all of the daemons associated with this executable.
|
Package stop provides the named command that kills all of the daemons associated with this executable. |
telnetd
This telnet daemon is only run from an embedded machine's /init, not /usr/bin/goes start
|
This telnet daemon is only run from an embedded machine's /init, not /usr/bin/goes start |
test/sleeper
Package sleeper provides a test ticker daemon.
|
Package sleeper provides a test ticker daemon. |
uptime
Package uptime returns the current system uptime.
|
Package uptime returns the current system uptime. |
uptimed
Package uptimed publishes the system uptime every 60 seconds to the local redis server.
|
Package uptimed publishes the system uptime every 60 seconds to the local redis server. |
watchdog
Watchdog is only run by an embedded machine's /init, not by /usr/bin/goes start
|
Watchdog is only run by an embedded machine's /init, not by /usr/bin/goes start |
external
|
|
atsock
Package atsock provides an interface to linux abstract sockets named "@NAME"
|
Package atsock provides an interface to linux abstract sockets named "@NAME" |
dbg
Package dbg provides yet another stylized debug printer.
|
Package dbg provides yet another stylized debug printer. |
flags
Package flags parses boolean options from command arguments.
|
Package flags parses boolean options from command arguments. |
i2c
Package i2c provides an interface to Linux I2C devices.
|
Package i2c provides an interface to Linux I2C devices. |
log
Package log prints messages to a given writer, /dev/log, /dev/kmsg, or a byte buffer until one of these are available.
|
Package log prints messages to a given writer, /dev/log, /dev/kmsg, or a byte buffer until one of these are available. |
redis
Package redis provides an interface to query and modify a local server.
|
Package redis provides an interface to query and modify a local server. |
redis/rpc
Package rpc provides remote calls to a redis server.
|
Package rpc provides remote calls to a redis server. |
redis/rpc/args
Package args provides types for the redis RPC arguments.
|
Package args provides types for the redis RPC arguments. |
redis/rpc/reg
Package reg provides an RPC to register redis handlers.
|
Package reg provides an RPC to register redis handlers. |
redis/rpc/reply
Package reply provides types and methods for the redis RPC replies.
|
Package reply provides types and methods for the redis RPC replies. |
xeth
This package provides a sideband control interface to an XETH driver.
|
This package provides a sideband control interface to an XETH driver. |
internal
|
|
assert
Package assert provides various assertions.
|
Package assert provides various assertions. |
buildid
This package gets a GO program's BuildId.
|
This package gets a GO program's BuildId. |
buildinfo
This package provides a runtime/debug.BuildInfo Formatter.
|
This package provides a runtime/debug.BuildInfo Formatter. |
cmdline
Package cmdline maps /proc/cmdline
|
Package cmdline maps /proc/cmdline |
fields
Slice a string into args while combining single, double, or backslash escaped spaced arguments, e.g.: echo hello\ beautiful\ world echo "hello 'beautiful world'" echo 'hello \"beautiful world\"'
|
Slice a string into args while combining single, double, or backslash escaped spaced arguments, e.g.: echo hello\ beautiful\ world echo "hello 'beautiful world'" echo 'hello \"beautiful world\"' |
fit
Package fit parses Flattened Image Tree image tree blob files.
|
Package fit parses Flattened Image Tree image tree blob files. |
group
Package group provides an /etc/group parser.
|
Package group provides an /etc/group parser. |
kill
Package kill provides a method to signal process groups.
|
Package kill provides a method to signal process groups. |
nocomment
Package nocomment strips a string trailing '#' prefaced comments along with its leading whitespace.
|
Package nocomment strips a string trailing '#' prefaced comments along with its leading whitespace. |
pizza
Slice args at boundary.
|
Slice args at boundary. |
prog
Package prog provides methods that return the current program base and full name along with it's minimal PATH.
|
Package prog provides methods that return the current program base and full name along with it's minimal PATH. |
Package lang provides text in alternative languages.
|
Package lang provides text in alternative languages. |
Click to show internal directories.
Click to hide internal directories.