From 0ed7a4c2ace8e95b0819e8484ac022d615fffe04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Ch=C3=A1vez?= Date: Tue, 23 Feb 2021 21:03:03 +0100 Subject: [PATCH] docs(component): improves the documentation to clarify that components should not accept anymore data on shutdown (#2481). (#2504) Clarifies that components should not accept anymore data on shutdown Closes #2481 --- component/component.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/component/component.go b/component/component.go index e2fec66901c..065c3e2d775 100644 --- a/component/component.go +++ b/component/component.go @@ -37,7 +37,8 @@ type Component interface { // Create a new context from the context.Background() for long-running operations. Start(ctx context.Context, host Host) error - // Shutdown is invoked during service shutdown. + // Shutdown is invoked during service shutdown. After Shutdown() is called, if the component accept data in + // any way, it should not accept it anymore. // // If there are any background operations running by the component they must be aborted as soon as possible. // Remember that if you started any long-running background operation from the Start() method that operation