utils

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateErrors

func AggregateErrors(errors []error) error

func NewLogErrors

func NewLogErrors(name string, logger log.Logger) govnr.Errorer

func Try

func Try(parentContext context.Context, tries int, timeoutPerTry time.Duration, retryInterval time.Duration, f func(ctxWithTimeout context.Context) error) (err error)

Types

type CacheFilter

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

func NewCacheFilter

func NewCacheFilter() *CacheFilter

func (*CacheFilter) CheckNewJsonValue

func (cf *CacheFilter) CheckNewJsonValue(value interface{}) bool

func (*CacheFilter) CheckNewValue

func (cf *CacheFilter) CheckNewValue(value Hasher) bool

func (*CacheFilter) Clear

func (cf *CacheFilter) Clear()

type CacheMap

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

func NewCacheMap

func NewCacheMap() *CacheMap

func (*CacheMap) CheckNewJsonValue

func (cm *CacheMap) CheckNewJsonValue(key string, value interface{}) bool

func (*CacheMap) CheckNewValue

func (cm *CacheMap) CheckNewValue(key string, value Hasher) bool

func (*CacheMap) Clear

func (cm *CacheMap) Clear(key string)

type HashedValue

type HashedValue struct {
	Value string
}

func (*HashedValue) Hash

func (v *HashedValue) Hash() string

type Hasher

type Hasher interface {
	Hash() string
}

Jump to

Keyboard shortcuts

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