Documentation ¶
Index ¶
- func ChanFromFile(filename string) <-chan string
- func ChanFromList(list []string) <-chan string
- func CmdDataEqual(cmddata1 CmdData, cmddata2 CmdData, strict bool) bool
- func CmdEqual(cmd1 Cmd, cmd2 Cmd) bool
- func DbRead(dbfilename string) <-chan CmdData
- func DbWrite(c <-chan CmdData, outputfile string)
- func DeployDot(c <-chan CmdData, outputfile string)
- func DeployMake(c <-chan CmdData, outputfile string)
- func DeployRc(c <-chan CmdData, outputfile string)
- func DeployRcCmd(c <-chan Cmd, outputfile string)
- func DeployTup(c <-chan CmdData, outputfile string)
- func ExtractMake(outputfile string)
- func ExtractShellCreate(rcfile *os.File) *os.File
- func FileTrace(command string, env map[string]string, dir string) (map[string]bool, map[string]bool)
- func RcParse(filename string, c <-chan string) <-chan Cmd
- func RcParseFile(rcfilename string) <-chan Cmd
- func RcRun(c <-chan Cmd) <-chan CmdData
- func ReFindMap(re *regexp.Regexp, l string) map[string]string
- func StraceParse1(straceChan <-chan string) <-chan string
- func StraceParse2(strace1Chan <-chan string) <-chan Strace2Info
- func StraceParse2Argsplit(straceArgs string) []string
- func StraceParse3(siChan <-chan Strace2Info, dir string) (map[string]bool, map[string]bool)
- func StraceRun(command string, env map[string]string, dir string) <-chan string
- func TmpEnd(f *os.File)
- type Cmd
- type CmdData
- type Strace2Info
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChanFromFile ¶
ChanFromFile returns a channel that receives the provided file, line-by-line.
func ChanFromList ¶
ChanFromList returns a channel that receives the elements of the list.
func CmdDataEqual ¶
CmdDataEqual checks if the provided CmdData's are equal strict controls wheather the deps of the second can be a subset of the deps of the first.
func DbWrite ¶
DbWrite dumps the CmdData that it reads from the provided channel into a sqlite database.
func DeployMake ¶
Create a Makefile file with db data read form the provided channel.
func DeployRcCmd ¶
func ExtractMake ¶
func ExtractMake(outputfile string)
ExtractMake creates the shell script and the Makefile that are used to create a busyna.rc from an existing Makefile
func ExtractShellCreate ¶
ExtractShellCreate creates the shell help script that is executed as the shell itself.
func FileTrace ¶
func FileTrace(command string, env map[string]string, dir string) (map[string]bool, map[string]bool)
FileTrace runs the given command and return two channels: the first with the files read and the second with the files written.
func RcRun ¶
Run all commands in channel, outputing the dependencies and targets to the second argument.
func StraceParse1 ¶
StraceParse1 is the parser that joins unfinished lines in proper order. Takes a channel that outputs strace lines, as returned by StraceRun. Returns a channel that receives the joined lines.
func StraceParse2 ¶
func StraceParse2(strace1Chan <-chan string) <-chan Strace2Info
StraceParse2 is the parser that interprets complete lines and returns the structured information. Takes a channel that outputs strace joined lines, as returned by StraceParser1.
func StraceParse2Argsplit ¶
StraceParse2Argsplit splits strace function arguments into a list.
func StraceParse3 ¶
StraceParse3 uses the structured strace output to generate the files read/written information. Returns read files, written files.
Types ¶
type Cmd ¶
A single shell command and the environment where it should be executed. It is a stripped-down os/exec Cmd structure
type Strace2Info ¶
type Strace2Info struct {
// contains filtered or unexported fields
}
Strace2Info is the structured strace output.