mirror of
https://github.com/logos-storage/logos-storage-network-crawler.git
synced 2026-01-02 13:33:08 +00:00
20 lines
737 B
Nim
20 lines
737 B
Nim
import pkg/chronos
|
|
import pkg/questionable/results
|
|
|
|
type Component* = ref object of RootObj
|
|
|
|
method awake*(c: Component): Future[?!void] {.async, base.} =
|
|
# Awake is called on all components in an unspecified order.
|
|
# Use this method to subscribe/connect to other components.
|
|
return success()
|
|
|
|
method start*(c: Component): Future[?!void] {.async, base.} =
|
|
# Start is called on all components in an unspecified order.
|
|
# Is is guaranteed that all components have already successfulled handled 'awake'.
|
|
# Use this method to begin the work of this component.
|
|
return success()
|
|
|
|
method stop*(c: Component): Future[?!void] {.async, base.} =
|
|
# Use this method to stop, unsubscribe, and clean up any resources.
|
|
return success()
|