gc

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GC

type GC struct {
	// contains filtered or unexported fields
}

GC represents an object garbage collector.

func New

func New(opts ...Option) *GC

New creates, initializes and returns GC instance.

func (*GC) Run

func (gc *GC) Run(ctx context.Context)

type Option

type Option func(*cfg)

Option represents GC constructor option.

func WithLogger

func WithLogger(v *logger.Logger) Option

WithLogger returns option to set logging component.

func WithQueueCapacity

func WithQueueCapacity(v uint32) Option

WithQueueCapacity returns option to set delete queue capacity.

func WithRemover

func WithRemover(v Remover) Option

WithRemover returns option to set object remover.

func WithSleepInterval

func WithSleepInterval(v time.Duration) Option

WithSleepInteval returns option to set sleep interval of GC.

func WithWorkingInterval

func WithWorkingInterval(v time.Duration) Option

WithWorkingInterval returns option to set working interval of GC.

type Remover

type Remover interface {
	// Delete removes object from physical storage.
	Delete(...*object.Address) error
}

Remover is an interface of the component that stores objects.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL