aboutsummaryrefslogtreecommitdiffstats
longrun-make

goetia-base
goetia
Software
0x53.net

The longrun-make program

longrun-make contains boilerplate code required to create the source directory of a longrun service based on strings.

Interface

     longrun-make workingdir name type script dependencies
  • type can only be one of log | srv.
  • dependencies can only be one of "dependency1 dependency2 ..." | none.
  • longrun-make creates the directory workingdir/name-type.
  • It creates the file workingdir/name-type/type (literal "type") and writes the line longrun to it.
  • It creates the file workingdir/name-type/notification-fd and writes the line 3 to it.
  • It creates the file workingdir/name-type/run and writes script to it.
  • If type is log and the file workingdir/name-type/consumer-for does not contain the string name:
    • longrun-make aquires a lock on the file workingdir/name-type/consumer-for using s6-setlock.
    • It appends the string name-srv to the file workingdir/name-type/consumer-for creating it if it does not exist.
    • It creates a file workingdir/name-type/pipeline-name, truncating it if it does exist and adds the string name.
  • If type is srv:
    • The file workingdir/name-type/producer-for is created, truncated and the string name-log is added.
  • If dependencies is not none:
    • The directory workingdir/name-type/dependencies.d is created.
    • For each word "dependency1 dependency2 ..." in dependencies separated by spaces, a file workingdir/name-type/dependencies.d/dependency is created.

longrun-make is, by means of locking and checking for duplicates, specifically designed to allow parallel creation of logging source directories.

Exit codes

  • 0: success
  • Since longrun-make is an execline script, it exits with an approximation of employed program that failed.
  • longrun-make mostly uses execline and s6 software, the exit behaviour of which can be looked up on their respective pages.
  • See also: execline exit code handling.

Options

  • There are no otions to longrun-make.