Closed avahowell closed 8 years ago
Probably not worth doing this PR, but now that we've got an API for the anthills, we can probably make a /stop
call instead of using os.Interrupt.
oh I guess that would require some method for interacting with the farm heh
siafc
yeah, I was thinking perhaps antfarmc
. sia-ant
still doesn't have an API though, meaning it would still need to receive a signal to stop.
So, my thoughs here are that we should:
I'm pretty happy with how the antfarm is going.
There also needs to be a lot more documentation. What's left for clean shutdown? farm.Close()
handles shutting down the API listener and the ant subprocesses.
Cleanshutdown should be using a threadgroup, right now it's piecemeal.
this PR adds a HTTP API for sia-antfarm, and adds another optional flag to the config manifest:
ExternalAntfarms
. This is an array of api addresses representing external antfarms that should be connected to on startup. Currently, this just means/gateway/connect
is called on each node in the antfarm to connect them manually to a node on the external antfarm.Note that in most cases, RPC addresses should be manually supplied in the config to avoid connectivity problems.