Documentation ¶
Overview ¶
Package gc provides a module for removing files and directories that have expired.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GarbageCollector ¶
type GarbageCollector struct {
// contains filtered or unexported fields
}
GarbageCollector is a module for removing files and directories that have expired. It allows us to make sure that the application does not leak files or directories when running.
func (GarbageCollector) Descriptor ¶
func (gc GarbageCollector) Descriptor() gotenberg.ModuleDescriptor
Descriptor returns a GarbageCollector's module descriptor.
func (*GarbageCollector) Provision ¶
func (gc *GarbageCollector) Provision(ctx *gotenberg.Context) error
Provision sets the module properties.
func (*GarbageCollector) Start ¶
func (gc *GarbageCollector) Start() error
Start starts the garbage collector.
func (GarbageCollector) StartupMessage ¶
func (gc GarbageCollector) StartupMessage() string
StartupMessage returns an empty string.
type GarbageCollectorExcludeSubstrModifier ¶
type GarbageCollectorExcludeSubstrModifier interface {
ExcludeSubstr() []string
}
GarbageCollectorExcludeSubstrModifier is a module interface which adds the given substrings to the exclude list of the garbage collector. If a path contains one of those substrings, the garbage collector ignores it.
type GarbageCollectorGraceDurationModifier ¶
GarbageCollectorGraceDurationModifier is a module interface which allows to update the expiration time of files and directories parsed by the garbage collector. For instance, if the grace duration is 30s, the garbage collector will remove paths that have a modification time older than 30s. If there are many GarbageCollectorGraceDurationModifier, only the longest grace duration is selected.