cache

package
v0.0.0-...-455e706 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSecretNotFound = errors.New("Cache Secret Is not Fount")
	ErrPolicyNotFound = errors.New("Cache Policies Is not Fount")
)

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func GetCacheInsOr

func GetCacheInsOr(cli store.Factory) (*Cache, error)

外部得到 通过 grpc 得到 apiserver的store

func (*Cache) GetPolicy

func (c *Cache) GetPolicy(key string) ([]*ladon.DefaultPolicy, error)

从cache中得到key对应的策略

func (*Cache) GetSecret

func (c *Cache) GetSecret(key string) (*pb.SecretInfo, error)

从cache库中得到key对应的密钥

func (*Cache) Reload

func (c *Cache) Reload() error

从 store 中得到对应的内容 重新得到全部的权限和密钥

Jump to

Keyboard shortcuts

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