las

package
v0.0.0-...-aa1fe35 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package las is lua associated state functionally it's just a module isolating a map of *lua.State to more *AssociatedState

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Free

func Free(state *lua.State)

Free the *AssociatedState for the given *lua.State

func Update

func Update(state *lua.State, updateFunc func(associatedState *AssociatedState) error) error

Update the associated state for the given state via callback

Types

type AssociatedState

type AssociatedState struct {
	Ctx         *fiber.Ctx
	TakeCount   int32
	MemoryStore *kv.KV
	DiskStore   *kv.KV
}

AssociatedState is the a collection of state that gets associated with *lua.State

func Get

func Get(state *lua.State) (*AssociatedState, bool)

Get the *AssociatedState for the given *lua.State or a false second return value if not found

func (*AssociatedState) GetTakeCount

func (as *AssociatedState) GetTakeCount() int32

GetTakeCount atomically

func (*AssociatedState) IncrementTakeCount

func (as *AssociatedState) IncrementTakeCount()

IncrementTakeCount atomically

Jump to

Keyboard shortcuts

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