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

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.15), 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.8) [details]
License BSD-3-Clause
Copyright Copyright (C) Obsidian Systems LLC 2017
Author Obsidian Systems LLC
Maintainer maintainer@obsidian.systems
Category System
Uploaded by abrar at 2020-11-02T01:56:57Z
Distributions
Reverse Dependencies 3 direct, 0 indirect [details]
Downloads 1281 total (20 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-11-02 [all 1 reports]

Readme for gargoyle-0.1.1.0

[back to package description]

gargoyle

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'