lru

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package lru defines the IssuanceChainCache type, which implements IssuanceChainCache interface with Get and Set operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheOption

type CacheOption struct {
	Size int
	TTL  time.Duration
}

type IssuanceChainCache

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

func NewIssuanceChainCache

func NewIssuanceChainCache(opt CacheOption) *IssuanceChainCache

func (*IssuanceChainCache) Get

func (c *IssuanceChainCache) Get(_ context.Context, key []byte) ([]byte, error)

func (*IssuanceChainCache) Set

func (c *IssuanceChainCache) Set(_ context.Context, key []byte, chain []byte) error

Jump to

Keyboard shortcuts

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