garbagetruck

package
v0.9.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GarbageTruck

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

GarbageTruck contains all the information for running it.

func New

func New(t time.Duration, lg Logger, wg *sync.WaitGroup, shutdown <-chan struct{}) *GarbageTruck

New creates new GarbageTruck and starts it.

func (*GarbageTruck) Run

func (gt *GarbageTruck) Run(wg *sync.WaitGroup, shutdown <-chan struct{}) error

Start the GarbageTruck. Logs the garbage collection stats.

func (*GarbageTruck) SetInterval

func (gt *GarbageTruck) SetInterval(t time.Duration)

SetInterval sets the time a which the ticker will tick.

func (*GarbageTruck) SetLog

func (gt *GarbageTruck) SetLog(lg Logger)

SetLog sets the logger.

type Logger

type Logger interface {
	Debug(params ...interface{})
	Error(params ...interface{})
}

Logger interface for GarbageTruck

Jump to

Keyboard shortcuts

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