jpillora / overseer

Monitorable, gracefully restarting, self-upgrading binaries in Go (golang)
MIT License
2.32k stars 207 forks source link

Add 'Multiple' fetcher #39

Open evalphobia opened 4 years ago

evalphobia commented 4 years ago

This PR adds a new fetcher. The fetcher can contain multiple other fetchers and execute and retrieve results from them.

// example usage
overseer.Run(overseer.Config{
    Program: prog,
    Fetcher:  &fetcher.Multiple{
        List: []fetcher.Interface{
            &fetcher.File{
                Path: "/path/to/my_app",
            },
            &fetcher.Github{
                User: "jpillora",
                Repo: "overseer",
            },
            // add other fetchers...
    },
})