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
-
typecan only be one oflog | srv. -
dependenciescan 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 linelongrunto it. -
It creates the file
workingdir/name-type/notification-fdand writes the line3to it. -
It creates the file
workingdir/name-type/runand writesscriptto it. -
If
typeislogand the fileworkingdir/name-type/consumer-fordoes not contain the stringname:-
longrun-make aquires a lock on the file
workingdir/name-type/consumer-forusing s6-setlock. -
It appends the string
name-srvto the fileworkingdir/name-type/consumer-forcreating it if it does not exist. -
It creates a file
workingdir/name-type/pipeline-name, truncating it if it does exist and adds the stringname.
-
longrun-make aquires a lock on the file
-
If
typeissrv:-
The file
workingdir/name-type/producer-foris created, truncated and the stringname-logis added.
-
The file
-
If
dependenciesis notnone:-
The directory
workingdir/name-type/dependencies.dis created. -
For each word
"dependency1 dependency2 ..."independenciesseparated by spaces, a fileworkingdir/name-type/dependencies.d/dependencyis created.
-
The directory
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.
