middleware

package
v1.12.3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cacheable

func Cacheable(cache cache.CacheServer, name string, options ...CacheOptions) endpoint.Middleware

Cacheable The simplest way to enable caching behavior for a method is to demarcate it with Cacheable and parameterize it with the name of the cache where the results would be stored

Types

type CacheOptions

type CacheOptions struct {
	TTL time.Duration
}

type EntryCache added in v1.12.1

type EntryCache struct {
	Status int         `json:"status"`
	Value  interface{} `json:"value"`
}

Jump to

Keyboard shortcuts

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