cache

package
v20.10.12+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DriverName is the name of the driver used for local log caching
	DriverName = local.Name
)

Variables

This section is empty.

Functions

func MergeDefaultLogConfig

func MergeDefaultLogConfig(dst, defaults map[string]string)

MergeDefaultLogConfig reads the default log opts and makes sure that any caching related keys that exist there are added to dst.

func ShouldUseCache

func ShouldUseCache(cfg map[string]string) bool

ShouldUseCache reads the log opts to determine if caching should be enabled

func WithLocalCache

func WithLocalCache(l logger.Logger, info logger.Info) (logger.Logger, error)

WithLocalCache wraps the passed in logger with a logger caches all writes locally in addition to writing to the passed in logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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