gcmap

package
v0.0.0-...-1a8195b Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: MIT Imports: 4 Imported by: 2

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 garbage clean struct

func NewGC

func NewGC(ctx context.Context, store safeMap.SafeMap) *GC

NewGC - singleton func, returns *GC struct

func (GC) ExpireKey

func (gc GC) ExpireKey(ctx context.Context)

ExpireKey - collects foul keys, what to remove later

func (GC) Expired

func (gc GC) Expired(ctx context.Context, key string, duration time.Duration)

Expired - fund Expired, gorutine which is launched every time the method is called, and ensures that the key is removed from the repository after the time expires

func (GC) LenBufferKeyChan

func (gc GC) LenBufferKeyChan() int

LenBufferKeyChan - returns len usage buffet of keyChan chanel

Jump to

Keyboard shortcuts

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