MCPcopy
hub / github.com/marmotedu/iam / GetRawKey

Method GetRawKey

pkg/storage/redis_cluster.go:478–490  ·  view source on GitHub ↗

GetRawKey return the value of the given key.

(keyName string)

Source from the content-addressed store, hash-verified

476
477// GetRawKey return the value of the given key.
478func (r *RedisCluster) GetRawKey(keyName string) (string, error) {
479 if err := r.up(); err != nil {
480 return "", err
481 }
482 value, err := r.singleton().Get(keyName).Result()
483 if err != nil {
484 log.Debugf("Error trying to get value: %s", err.Error())
485
486 return "", ErrKeyNotFound
487 }
488
489 return value, nil
490}
491
492// GetExp return the expiry of the given key.
493func (r *RedisCluster) GetExp(keyName string) (int64, error) {

Callers

nothing calls this directly

Calls 5

upMethod · 0.95
singletonMethod · 0.95
DebugfFunction · 0.92
GetMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected