Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles graceful cleanup of resources with error aggregation. This consolidates the defer Close() pattern used across cmd/server/main.go and pkg/cedros/app.go.
func (*Manager) Close ¶
Close closes all registered resources in reverse order. It aggregates all errors and logs them, returning the first error encountered. This ensures all cleanup attempts are made even if some fail.
func (*Manager) Register ¶
Register adds a resource to be closed when the manager is closed. Resources are closed in reverse order of registration (LIFO).
func (*Manager) RegisterFunc ¶
RegisterFunc wraps a cleanup function as a Closer for convenience.
Click to show internal directories.
Click to hide internal directories.