keepalive

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SliceFind

func SliceFind[T any](s []T, f func(*T) bool) (*T, bool)

func SliceFindIndex

func SliceFindIndex[T any](s []*T, f func(*T) bool) int

func SliceFindKA

func SliceFindKA[T any](d []KAElem, f func(*T) bool) (*T, int)

func SliceFindKAForSave

func SliceFindKAForSave[T any](d []KAElem, f func(*T) bool) (int, bool)

func SliceFindPtr

func SliceFindPtr[T any](s []*T, f func(*T) bool) (*T, bool)

func SwapDelete

func SwapDelete[T any](s []T, f func(*T) bool) ([]T, bool)

func SwapDeletePtr

func SwapDeletePtr[T any](s []*T, f func(*T) bool) ([]*T, bool)

Types

type KAElem

type KAElem struct {
	Data       unsafe.Pointer
	WriteIndex int64
	NoOrigin   int32
	State      KAState
	Wrote      uint16
}

type KAState

type KAState uint16
const (
	KAStateReset KAState = iota
	KAStateDelete
	KAStateRead
	KAStateSave
)

type KeepAlive

type KeepAlive struct {
	Data      []KAElem
	SliceData [][]KAElem
	WI        []int64
	WSI       []int64
	SDUsed    []int
	DUsed     []int
}

func (*KeepAlive) AddData

func (ka *KeepAlive) AddData() (*KAElem, int)

func (*KeepAlive) AddSliceData

func (ka *KeepAlive) AddSliceData() (*[]KAElem, int)

func (*KeepAlive) Clear

func (ka *KeepAlive) Clear(sdUsed, dUsed []int)

Jump to

Keyboard shortcuts

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