core

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClearFunc

type ClearFunc[T any] func(e *T)

type List

type List[T any] struct {
	// contains filtered or unexported fields
}

func (*List[T]) Back

func (l *List[T]) Back() *Node[T]

func (*List[T]) Clear

func (l *List[T]) Clear()

func (*List[T]) Front

func (l *List[T]) Front() *Node[T]

func (*List[T]) IsEmpty

func (l *List[T]) IsEmpty() bool

func (*List[T]) PopBack

func (l *List[T]) PopBack() *Node[T]

func (*List[T]) PopFront

func (l *List[T]) PopFront() *Node[T]

func (*List[T]) PushBack

func (l *List[T]) PushBack(n *Node[T])

type Node

type Node[T any] struct {
	// contains filtered or unexported fields
}

func (*Node[T]) Delete

func (n *Node[T]) Delete()
func (n *Node[T]) DeleteLink() *Node[T]
func (n *Node[T]) SetLink(link *Node[T]) *Node[T]

func (*Node[T]) SetV

func (n *Node[T]) SetV(val T) *Node[T]

func (*Node[T]) V

func (n *Node[T]) V() T

type Pool

type Pool[T any] struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool[T any](clearF ClearFunc[T]) *Pool[T]

func (*Pool[T]) Acquire

func (p *Pool[T]) Acquire() *T

func (*Pool[T]) Release

func (p *Pool[T]) Release(els ...*T)

type Transaction

type Transaction struct {
	WithoutSearch bool
	// contains filtered or unexported fields
}

func (*Transaction) Clear

func (tx *Transaction) Clear()

func (*Transaction) File

func (tx *Transaction) File(key string) *file

func (*Transaction) Files

func (tx *Transaction) Files() map[string]*file

func (*Transaction) Len

func (tx *Transaction) Len() int

func (*Transaction) Lock

func (tx *Transaction) Lock()

func (*Transaction) PushBack

func (tx *Transaction) PushBack(n *Node[model.File])

func (*Transaction) RLock

func (tx *Transaction) RLock()

func (*Transaction) RUnlock

func (tx *Transaction) RUnlock()

func (*Transaction) Unlock

func (tx *Transaction) Unlock()

type Transactions

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

func (*Transactions) Delete

func (txs *Transactions) Delete(txId string) *Transaction

func (*Transactions) Get

func (txs *Transactions) Get(txId string) (*Transaction, bool)

func (*Transactions) Put

func (txs *Transactions) Put(txId string, tx *Transaction)

Jump to

Keyboard shortcuts

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