Skip to content

Commit

Permalink
docs(component): improves the documentation to clarify that component…
Browse files Browse the repository at this point in the history
…s should not accept anymore data on shutdown (#2481). (#2504)

Clarifies that components should not accept anymore data on shutdown 

Closes #2481
  • Loading branch information
jcchavezs authored Feb 23, 2021
1 parent a04feee commit 0ed7a4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion component/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ed7a4c

Please sign in to comment.