base

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindParentDir

func FindParentDir(path string) (string, error)

Types

type Broker

type Broker interface {
	Parse(content []byte) (error, map[string]interface{})
	LoadContent() ([]byte, error)
	Watch()
	Decode(input interface{}, output interface{}, weaklyTypedInput bool) error
	Notify() <-chan struct{}
	io.Closer
}
type DoubleLink struct {
	Val  interface{}
	Key  string
	Next *DoubleLink
	Prev *DoubleLink
}

type LRUCache

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

func CacheConstructor

func CacheConstructor(capacity int) *LRUCache

func (*LRUCache) AddToHead

func (this *LRUCache) AddToHead(node *DoubleLink)

func (*LRUCache) Flush

func (this *LRUCache) Flush()

func (*LRUCache) Get

func (this *LRUCache) Get(key string) (interface{}, bool)

func (*LRUCache) MoveToHead

func (this *LRUCache) MoveToHead(node *DoubleLink)

func (*LRUCache) Put

func (this *LRUCache) Put(key string, value interface{})

func (*LRUCache) RemoveNode

func (this *LRUCache) RemoveNode(node *DoubleLink)

func (*LRUCache) RemoveTail

func (this *LRUCache) RemoveTail() *DoubleLink

Jump to

Keyboard shortcuts

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