Documentation
¶
Overview ¶
Package service enhances service orchestration by grouping related functionality, wrapping functions to support context-aware execution and add lifecycle-oriented functionality like signal handling in cloud-native environments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Context ¶ added in v0.1.20
func Context() (ctx context.Context, cancel context.CancelFunc)
Context creates a new context with a cancel function that listens for SIGTERM, SIGINT, SIGQUIT, and SIGKILL signals.
func RegisterOnContextDone ¶ added in v0.1.20
RegisterOnContextDone waits for the context to be done and then calls the function.
Types ¶
type Function ¶
Function gathers together things that change for the same reasons. A context must be handled to be "cloud native" because it allows propagation of deadlines, cancellation signals, and other request-scoped values across API boundaries and between processes. This ensures efficient resource utilization and proper handling of asynchronous workflows in distributed systems.