fabric-samples/off_chain_data/application-go
Stanislav Jakuschevskij 624f65da12
Implement graceful shutdown of listen function
Before when pressing 'ctrl+c' and stopping the go program non of the
deferred functions in listen.go were called. A standard procedure for
stopping goroutines with context was implemented which shuts down the
program gracefully. Logs were added to notify the user that the shutdown
was successful.

Signed-off-by: Stanislav Jakuschevskij <stas@two-giants.com>
2025-02-24 13:14:48 +01:00
..
contract Extract block processor and store from listener 2025-02-24 13:14:47 +01:00
parser Extract block processor and store from listener 2025-02-24 13:14:47 +01:00
processor Extract block processor and store from listener 2025-02-24 13:14:47 +01:00
store Extract block processor and store from listener 2025-02-24 13:14:47 +01:00
utils Extract block processor and store from listener 2025-02-24 13:14:47 +01:00
app.go Implement caching 2025-02-24 13:14:47 +01:00
connect.go Extract block processor and store from listener 2025-02-24 13:14:47 +01:00
getAllAssets.go Implement caching 2025-02-24 13:14:47 +01:00
go.mod Encapsulate block parser in a package 2025-02-24 13:14:47 +01:00
go.sum Encapsulate block parser in a package 2025-02-24 13:14:47 +01:00
listen.go Implement graceful shutdown of listen function 2025-02-24 13:14:48 +01:00
transact.go Extract block processor and store from listener 2025-02-24 13:14:47 +01:00