MCPcopy
hub / github.com/1Panel-dev/KubePi / Get

Method Get

thirdparty/gotty/cache/token/mem.go:23–34  ·  view source on GitHub ↗

Get token param from memory

(token string)

Source from the content-addressed store, hash-verified

21
22//Get token param from memory
23func (r *MemCache) Get(token string) *TtyParameter {
24 obj, exit := r.cache.Get(token)
25 if !exit {
26 return nil
27 }
28 param, ok := obj.(TtyParameter)
29 if ok {
30 return &param
31 }
32 log.Printf("get token %s from mem obj is not tty param", token)
33 return nil
34}
35
36//Delete token from memory
37func (r *MemCache) Delete(token string) error {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected