Documentation ¶
Overview ¶
Package cache defines the IssuanceChainCache type, which allows different cache implementation with Get and Set operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IssuanceChainCache ¶
type IssuanceChainCache interface { // Get returns the issuance chain associated with the provided hash. Get(ctx context.Context, key []byte) ([]byte, error) // Set inserts the key-value pair of issuance chain. Set(ctx context.Context, key []byte, chain []byte) error }
IssuanceChainCache is an interface which allows CTFE binaries to use different cache implementations for issuance chains.
func NewIssuanceChainCache ¶
func NewIssuanceChainCache(_ context.Context, cacheType Type, option Option) (IssuanceChainCache, error)
NewIssuanceChainCache returns noop.IssuanceChainCache for noop type or lru.IssuanceChainCache for lru cache type.
Directories ¶
Path | Synopsis |
---|---|
Package lru defines the IssuanceChainCache type, which implements IssuanceChainCache interface with Get and Set operations.
|
Package lru defines the IssuanceChainCache type, which implements IssuanceChainCache interface with Get and Set operations. |
Package noop defines the IssuanceChainCache type, which implements IssuanceChainCache interface with Get and Set operations.
|
Package noop defines the IssuanceChainCache type, which implements IssuanceChainCache interface with Get and Set operations. |
Click to show internal directories.
Click to hide internal directories.