MCPcopy
hub / github.com/vulcand/vulcand / Get

Method Get

plugin/cacheprovider/MemCacheProvider.go:34–42  ·  view source on GitHub ↗

Get returns a certificate data for the specified key. If there's no such key, Get returns ErrCacheMiss.

(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

32// Get returns a certificate data for the specified key.
33// If there's no such key, Get returns ErrCacheMiss.
34func (ng *memAutoCertCache) Get(ctx context.Context, key string) ([]byte, error) {
35 ng.mtx.Lock()
36 defer ng.mtx.Unlock()
37 val, ok := ng.kv[key]
38 if ok {
39 return val, nil
40 }
41 return nil, autocert.ErrCacheMiss
42}
43
44// Put stores the data in the cache under the specified key.
45// Inderlying implementations may use any data storage format,

Callers 15

TestRewriteMatchMethod · 0.45
TestRewriteNoMatchMethod · 0.45
TestHeaderVarMethod · 0.45
TestMultipleHeadersMethod · 0.45
TestSameHeaderMultiMethod · 0.45
TestUnknownHeaderMethod · 0.45
TestUnknownVarMethod · 0.45
TestRewriteInQueryMethod · 0.45
TestRewriteSchemeMethod · 0.45
TestRedirectMethod · 0.45

Calls

no outgoing calls

Tested by 15

TestRewriteMatchMethod · 0.36
TestRewriteNoMatchMethod · 0.36
TestHeaderVarMethod · 0.36
TestMultipleHeadersMethod · 0.36
TestSameHeaderMultiMethod · 0.36
TestUnknownHeaderMethod · 0.36
TestUnknownVarMethod · 0.36
TestRewriteInQueryMethod · 0.36
TestRewriteSchemeMethod · 0.36
TestRedirectMethod · 0.36