interfacecache

package
v0.0.0-...-f97b8c8 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterfaceCache

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

func NewInterfaceCache

func NewInterfaceCache() (ic *InterfaceCache)

InterfaceCache allows for easy reuse of a specific interface value for a specified duration of time. Does not reset the lastRequest when a new request is made.

func (*InterfaceCache) Result

func (ic *InterfaceCache) Result(dur time.Duration, getter func() interface{}) (res interface{})

Jump to

Keyboard shortcuts

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