cryptocache

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptoCache

type CryptoCache interface {
	GetCrypto(key string) ([]byte, error)
	SetCrypto(key string, value []byte) error
}

CryptoCache is used for storing/retrieving crypto (certs and keys).

type MemCache

type MemCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

MemCache is an in-memory implementation of the CryptoCache interface.

func NewMemCache

func NewMemCache() *MemCache

NewMemCache creates MemCache instance and returns pointer to it.

func (*MemCache) GetCrypto

func (m *MemCache) GetCrypto(key string) ([]byte, error)

GetCrypto retrieves crypto from in-memory storage.

func (*MemCache) SetCrypto

func (m *MemCache) SetCrypto(key string, value []byte) error

SetCrypto saves crypto to the in-memory storage.

Jump to

Keyboard shortcuts

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