From 31f4afadea652d6df006d3718b60ecb997ac99cf Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Fri, 13 Dec 2019 09:47:42 +0100 Subject: [PATCH] cluster: Improve Shutdown() docstring --- cluster.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cluster.go b/cluster.go index 5b02c475..8abcd729 100644 --- a/cluster.go +++ b/cluster.go @@ -655,7 +655,15 @@ func (c *Cluster) Ready() <-chan struct{} { return c.readyCh } -// Shutdown stops the IPFS cluster components +// Shutdown performs all the necessary operations to shutdown +// the IPFS Cluster peer: +// * Save peerstore with the current peers +// * Remove itself from consensus when LeaveOnShutdown is set +// * It Shutdowns all the components +// * Closes the datastore +// * Collects all goroutines +// +// Shutdown does not closes the libp2p host or the DHT. func (c *Cluster) Shutdown(ctx context.Context) error { _, span := trace.StartSpan(ctx, "cluster/Shutdown") defer span.End()