client

package
v0.0.0-...-3fd51b5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ARC

type ARC[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*ARC[K, V]) Close

func (c *ARC[K, V]) Close()

func (*ARC[K, V]) Get

func (c *ARC[K, V]) Get(key K) (V, bool)

func (*ARC[K, V]) Init

func (c *ARC[K, V]) Init(capacity int)

func (*ARC[K, V]) Name

func (c *ARC[K, V]) Name() string

func (*ARC[K, V]) Set

func (c *ARC[K, V]) Set(key K, value V)

type Ccache

type Ccache[V any] struct {
	// contains filtered or unexported fields
}

func (*Ccache[V]) Close

func (c *Ccache[V]) Close()

func (*Ccache[V]) Get

func (c *Ccache[V]) Get(key string) (V, bool)

func (*Ccache[V]) Init

func (c *Ccache[V]) Init(capacity int)

func (*Ccache[V]) Name

func (c *Ccache[V]) Name() string

func (*Ccache[V]) Set

func (c *Ccache[V]) Set(key string, value V)

type Client

type Client[K comparable, V any] interface {
	Init(capacity int)
	Get(key K) (V, bool)
	Set(key K, value V)
	Name() string
	Close()
}

type ClockPro

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

func (*ClockPro) Close

func (c *ClockPro) Close()

func (*ClockPro) Get

func (c *ClockPro) Get(key uint64) (uint64, bool)

func (*ClockPro) Init

func (c *ClockPro) Init(capacity int)

func (*ClockPro) Name

func (c *ClockPro) Name() string

func (*ClockPro) Set

func (c *ClockPro) Set(key, value uint64)

type FIFO

type FIFO[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*FIFO[K, V]) Close

func (c *FIFO[K, V]) Close()

func (*FIFO[K, V]) Get

func (c *FIFO[K, V]) Get(key K) (V, bool)

func (*FIFO[K, V]) Init

func (c *FIFO[K, V]) Init(capacity int)

func (*FIFO[K, V]) Name

func (c *FIFO[K, V]) Name() string

func (*FIFO[K, V]) Set

func (c *FIFO[K, V]) Set(key K, value V)

type LRU

type LRU[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*LRU[K, V]) Close

func (c *LRU[K, V]) Close()

func (*LRU[K, V]) Get

func (c *LRU[K, V]) Get(key K) (V, bool)

func (*LRU[K, V]) Init

func (c *LRU[K, V]) Init(capacity int)

func (*LRU[K, V]) Name

func (c *LRU[K, V]) Name() string

func (*LRU[K, V]) Set

func (c *LRU[K, V]) Set(key K, value V)

type Otter

type Otter[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*Otter[K, V]) Close

func (c *Otter[K, V]) Close()

func (*Otter[K, V]) Get

func (c *Otter[K, V]) Get(key K) (V, bool)

func (*Otter[K, V]) Init

func (c *Otter[K, V]) Init(capacity int)

func (*Otter[K, V]) Name

func (c *Otter[K, V]) Name() string

func (*Otter[K, V]) Set

func (c *Otter[K, V]) Set(key K, value V)

type Ristretto

type Ristretto[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*Ristretto[K, V]) Close

func (c *Ristretto[K, V]) Close()

func (*Ristretto[K, V]) Get

func (c *Ristretto[K, V]) Get(key K) (V, bool)

func (*Ristretto[K, V]) Init

func (c *Ristretto[K, V]) Init(capacity int)

func (*Ristretto[K, V]) Name

func (c *Ristretto[K, V]) Name() string

func (*Ristretto[K, V]) Set

func (c *Ristretto[K, V]) Set(key K, value V)

type Theine

type Theine[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*Theine[K, V]) Close

func (c *Theine[K, V]) Close()

func (*Theine[K, V]) Get

func (c *Theine[K, V]) Get(key K) (V, bool)

func (*Theine[K, V]) Init

func (c *Theine[K, V]) Init(capacity int)

func (*Theine[K, V]) Name

func (c *Theine[K, V]) Name() string

func (*Theine[K, V]) Set

func (c *Theine[K, V]) Set(key K, value V)

type TinyLFU

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

func (*TinyLFU) Close

func (c *TinyLFU) Close()

func (*TinyLFU) Get

func (c *TinyLFU) Get(key uint64) (uint64, bool)

func (*TinyLFU) Init

func (c *TinyLFU) Init(capacity int)

func (*TinyLFU) Name

func (c *TinyLFU) Name() string

func (*TinyLFU) Set

func (c *TinyLFU) Set(key, value uint64)

Jump to

Keyboard shortcuts

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