gargoyle: Automatically spin up and spin down local daemons

[ bsd3, library, system ] [ Propose Tags ]

Gargoyle is a framework for managing daemons from Haskell. In the current release the only requirement is that the daemon be able to communicate over a Unix domain socket. See gargoyle-postgresql for a fully worked out example.

To use Gargoyle the client must:

  1. Define a value of the Gargoyle type which specifies how to administer the daemon.

  2. Create an executable whose main is gargoyleMain. The name of this executable should match the executable name specified in the _gargoyle_exec field of the Gargoyle.

  3. The client will run their code with withGargoyle to gain access to the daemon.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.1.1.0, 0.1.1.1, 0.1.2.0
Change log ChangeLog.md
Dependencies base (>=4.12.0 && <4.20), directory (>=1.3.3 && <1.4), filelock (>=0.1.1 && <0.2), filepath (>=1.4.2 && <1.5), network (>=2.6.0 && <3.2), process (>=1.5.0 && <1.7), unix (>=2.7.2 && <2.9) [details]
License BSD-3-Clause
Copyright Copyright (C) Obsidian Systems LLC 2017
Author Obsidian Systems LLC
Maintainer maintainer@obsidian.systems
Revised Revision 1 made by abrar at 2024-05-28T20:24:47Z
Category System
Uploaded by abrar at 2024-01-26T14:41:42Z
Distributions NixOS:0.1.2.0
Reverse Dependencies 3 direct, 0 indirect [details]
Downloads 1383 total (17 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for gargoyle-0.1.2.0

[back to package description]

gargoyle

Haskell Hackage Github CI BSD3 License

Gargoyle is a framework for managing daemons from Haskell. Currently, the only requirement is that the daemon be able to communicate over a Unix domain socket. See gargoyle-postgresql for an example that uses gargoyle to manage postgresql.

To use Gargoyle the client must:

  • Define a value of the 'Gargoyle' type which specifies how to administer the daemon.
  • Create an executable whose main is gargoyleMain. The name of this executable should match the executable name specified in the _gargoyle_exec field of the Gargoyle.
  • The client will run their code with withGargoyle to gain access to the daemon.

Importing into Haskell package set

haskellPackages.override {
  overrides = self: super:
    let gargoylePkgs = import ./path/to/gargoyle-repo { haskellPackages = self; };
    in gargoylePkgs // {
      # .. your overrides
    };
}

By default gargoyle-postgresql-nix will use the postgresql of the pkgs used by your haskellPackages. To override this, pass postgresql by changing the above line to look more like

gargoylePkgs = import ./path/to/gargoyle-repo { haskellPackages = self; postgresql = myCustomVersion; }

Hacking

Do something like this:

nix-shell -A gargoyle-postgresql.env --run 'cd gargoyle-postgresql && cabal new-repl'