cache

package
v1.4.32 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SandboxCache added in v1.4.3

type SandboxCache struct {
	Entries map[string]*SandboxCacheEntry
	// contains filtered or unexported fields
}

SandboxCache contains cached tokens

func NewSandboxCache added in v1.4.3

func NewSandboxCache() *SandboxCache

NewSandboxCache returns SandboxCache instance.

func (*SandboxCache) Add added in v1.4.3

func (c *SandboxCache) Add(sandboxID string, u *user.User) error

Add adds user to the cache.

func (*SandboxCache) Delete added in v1.4.3

func (c *SandboxCache) Delete(sandboxID string) error

Delete removes cached user entry.

func (*SandboxCache) Expire added in v1.4.7

func (c *SandboxCache) Expire(sandboxID string)

Expire expires a particular sandbox entry.

func (*SandboxCache) Get added in v1.4.3

func (c *SandboxCache) Get(sandboxID string) (*user.User, error)

Get returns cached user entry.

func (*SandboxCache) GetCleanupInterval added in v1.4.3

func (c *SandboxCache) GetCleanupInterval() int

GetCleanupInterval returns cleanup interval.

func (*SandboxCache) GetMaxEntryLifetime added in v1.4.3

func (c *SandboxCache) GetMaxEntryLifetime() int

GetMaxEntryLifetime returns max entry lifetime.

func (*SandboxCache) Run added in v1.4.7

func (c *SandboxCache) Run()

Run starts management of SandboxCache instance.

func (*SandboxCache) SetCleanupInterval added in v1.4.7

func (c *SandboxCache) SetCleanupInterval(i int) error

SetCleanupInterval sets cache management interval.

func (*SandboxCache) SetMaxEntryLifetime added in v1.4.7

func (c *SandboxCache) SetMaxEntryLifetime(i int) error

SetMaxEntryLifetime sets cache management max entry lifetime in seconds.

func (*SandboxCache) Stop added in v1.4.7

func (c *SandboxCache) Stop()

Stop stops management of SandboxCache instance.

type SandboxCacheEntry added in v1.4.3

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

SandboxCacheEntry is an entry in SandboxCache.

func (*SandboxCacheEntry) Valid added in v1.4.3

func (e *SandboxCacheEntry) Valid(max int) error

Valid checks whether SandboxCacheEntry is non-expired.

type SessionCache

type SessionCache struct {
	Entries map[string]*SessionCacheEntry
	// contains filtered or unexported fields
}

SessionCache contains cached tokens

func NewSessionCache

func NewSessionCache() *SessionCache

NewSessionCache returns SessionCache instance.

func (*SessionCache) Add

func (c *SessionCache) Add(sessionID string, u *user.User) error

Add adds user to the cache.

func (*SessionCache) Delete

func (c *SessionCache) Delete(sessionID string) error

Delete removes cached user entry.

func (*SessionCache) Get

func (c *SessionCache) Get(sessionID string) (*user.User, error)

Get returns cached user entry.

func (*SessionCache) GetCleanupInterval added in v1.4.3

func (c *SessionCache) GetCleanupInterval() int

GetCleanupInterval returns cleanup interval.

func (*SessionCache) Run added in v1.4.7

func (c *SessionCache) Run()

Run starts management of SessionCache instance.

func (*SessionCache) SetCleanupInterval added in v1.4.7

func (c *SessionCache) SetCleanupInterval(i int) error

SetCleanupInterval sets cache management interval.

func (*SessionCache) Stop added in v1.4.7

func (c *SessionCache) Stop()

Stop stops management of SessionCache instance.

type SessionCacheEntry added in v1.4.3

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

SessionCacheEntry is an entry in SessionCache.

func (*SessionCacheEntry) Valid added in v1.4.3

func (e *SessionCacheEntry) Valid() error

Valid checks whether SessionCacheEntry is not expired.

Jump to

Keyboard shortcuts

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