Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GC ¶
type GC interface { // Add adds GC task Add(string, Task) // Run GC task Run(string) error // Run all registered GC tasks RunAll() // Serve running the GC task Serve() // Stop running the GC task Stop() }
GC is the interface used for release resource
type Logger ¶
type Logger interface { // Infof logs routine messages for GC Infof(template string, args ...interface{}) // Error logs error messages for GC Errorf(template string, args ...interface{}) }
Logger is the interface used in GC for logging
type Option ¶
type Option func(g *gc)
Option is a functional option for configuring the GC
func WithInterval ¶
WithInterval set the interval for GC collection
func WithTimeout ¶
WithTimeout set the timeout for GC collection
Click to show internal directories.
Click to hide internal directories.