Files
maddy/framework/resource/resource.go
fox.cpp f82742b392 Implement net.Listener hand-over during config reload
Log library refactored a little to make it easier to enable debug logging.
2025-01-30 01:45:19 +03:00

19 lines
285 B
Go

package resource
import (
"io"
)
type Resource = io.Closer
type CheckableResource interface {
Resource
IsUsable() bool
}
type Container[T Resource] interface {
io.Closer
GetOpen(key string, open func() (T, error)) (T, error)
CloseUnused(isUsed func(key string) bool) error
}