Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Get(token string) *TtyParameter Delete(token string) error Add(token string, param *TtyParameter, d time.Duration) error }
interface that defines token cache behavior
type MemCache ¶
type MemCache struct {
// contains filtered or unexported fields
}
MemCache use memory to store token and TtyParameter
func (*MemCache) Get ¶
func (r *MemCache) Get(token string) *TtyParameter
Get token param from memory
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
RedisCache use redis to store token and TtyParameter
func NewRedisCache ¶
func NewRedisCache(client *redis.Client, prefix string) *RedisCache
NewRedisCache new redis token cache
func (*RedisCache) Add ¶
func (r *RedisCache) Add(token string, param *TtyParameter, d time.Duration) error
Add token to redis
func (*RedisCache) Get ¶
func (r *RedisCache) Get(token string) *TtyParameter
Get token param from redis
type TtyParameter ¶
TtyParameter kubectl tty param
Click to show internal directories.
Click to hide internal directories.