mem

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(match string)

* * Clear * @param match string *

func Delete added in v0.1.4

func Delete(key string) bool

* * Delete * @param key string * @return bool *

func Empty

func Empty()

* * Empty *

func Get

func Get(key string) (interface{}, bool)

* * Get * @param key, def string * @return string, bool *

func GetArrayJson added in v1.0.12

func GetArrayJson(key string) ([]et.Json, bool)

* * GetArrayJson * @param key string * @return []et.Json, bool *

func GetBool added in v1.0.12

func GetBool(key string) (bool, bool)

* * GetBool * @param key string * @return bool, bool *

func GetDuration added in v1.0.12

func GetDuration(key string) (time.Duration, bool)

* * GetDuration * @param key string * @return time.Duration, bool *

func GetFloat64 added in v1.0.12

func GetFloat64(key string) (float64, bool)

* * GetFloat64 * @param key string * @return float64, bool *

func GetInt added in v1.0.12

func GetInt(key string) (int, bool)

* * GetInt * @param key string * @return int, bool *

func GetInt64 added in v1.0.12

func GetInt64(key string) (int64, bool)

* * GetInt64 * @param key string * @return int64, bool *

func GetJson added in v1.0.12

func GetJson(key string) (et.Json, bool)

* * GetJson * @param key string * @return et.Json, bool *

func GetStr added in v1.0.12

func GetStr(key string) (string, bool)

* * GetStr * @param key string * @return string, bool *

func GetTime added in v1.0.12

func GetTime(key string) (time.Time, bool)

* * GetTime * @param key string * @return time.Time, bool *

func Keys

func Keys() []string

* * Keys * @return []string *

func Len

func Len() int

* * Len * @return int *

func More

func More(key string, expiration time.Duration)

* * More * @param key string * @param expiration time.Duration *

func Values

func Values() []string

* * Values * @return []string *

Types

type Item

type Item struct {
	LastUpdate time.Time
	Expiration time.Duration
	Key        string
	Value      interface{}
	// contains filtered or unexported fields
}

func GetItem added in v1.0.12

func GetItem(key string) (*Item, bool)

* * GetItem * @param key string * @return *Item, bool *

func New

func New(key string, value interface{}, expiration time.Duration) *Item

* * New create new item * @param key string * @param value interface{} * @return *Item *

func Set

func Set(key string, value interface{}, expiration time.Duration) *Item

* * Set * @param key string, value interface{}, expiration time.Duration * @return *Item *

func (*Item) ArrayDuration

func (i *Item) ArrayDuration() []time.Duration

* * ArrayDuration return the value of item * @return []time.Duration *

func (*Item) ArrayFloat

func (i *Item) ArrayFloat() []float64

* * ArrayFloat return the value of item * @return []float64 *

func (*Item) ArrayInt

func (i *Item) ArrayInt() []int

* * ArrayInt return the value of item * @return []int *

func (*Item) ArrayJson

func (i *Item) ArrayJson() []et.Json

* * ArrayJson return the value of item * @return []et.Json *

func (*Item) ArrayMap

func (i *Item) ArrayMap() []map[string]interface{}

* * ArrayMap return the value of item * @return []interface{} *

func (*Item) ArrayStr

func (i *Item) ArrayStr() []string

* * ArrayStr return the value of item * @return []string *

func (*Item) ArrayTime

func (i *Item) ArrayTime() []time.Time

* * ArrayTime return the value of item * @return []time.Time *

func (*Item) Bool

func (i *Item) Bool() bool

* * Bool return the value of item * @return bool *

func (*Item) Duration

func (i *Item) Duration() time.Duration

* * Duration return the value of item * @return time.Duration *

func (*Item) Float

func (i *Item) Float() float64

* * Float return the value of item * @return float64 *

func (*Item) Get

func (i *Item) Get() interface{}

* * Get a value from item * @return interface{} *

func (*Item) Int

func (i *Item) Int() int

* * Int return the value of item * @return int *

func (*Item) Int64

func (i *Item) Int64() int64

* * Int64 return the value of item * @return int64 *

func (*Item) Json

func (i *Item) Json() et.Json

* * Json return the value of item * @return et.Json *

func (*Item) Map

func (i *Item) Map() map[string]interface{}

* * Map return the value of item * @return map[string]interface{} *

func (*Item) Set

func (i *Item) Set(value interface{}, expiration time.Duration) interface{}

* * Set a value in item * @param value interface{} * @return interface{} *

func (*Item) Str

func (i *Item) Str() string

* * Str return the value of item * @return string *

func (*Item) Time

func (i *Item) Time() time.Time

* * Time return the value of item * @return time.Time *

type Mem

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

func Load

func Load() (*Mem, error)

func (*Mem) Clear

func (s *Mem) Clear(match string)

* * Clear * @param match string *

func (*Mem) Delete added in v1.0.12

func (s *Mem) Delete(key string) bool

* * Delete * @param key string * @return bool *

func (*Mem) Empty

func (s *Mem) Empty()

func (*Mem) Get

func (s *Mem) Get(key string) (interface{}, bool)

* * Get * @param key string * @return interfase{}, error *

func (*Mem) GetArrayFloat added in v1.0.12

func (s *Mem) GetArrayFloat(key string, def []float64) ([]float64, bool)

* * GetArrayFloat * @param key string, def []float64 * @return []float64, bool *

func (*Mem) GetArrayInt added in v1.0.12

func (s *Mem) GetArrayInt(key string, def []int) ([]int, bool)

* * GetArrayInt * @param key string, def []int * @return []int, bool *

func (*Mem) GetArrayJson added in v1.0.12

func (s *Mem) GetArrayJson(key string, def []et.Json) ([]et.Json, bool)

* * GetArrayJson * @param key string, def []et.Json * @return []et.Json, bool *

func (*Mem) GetArrayStr added in v1.0.12

func (s *Mem) GetArrayStr(key string, def []string) ([]string, bool)

* * GetArrayStr * @param key string, def []string * @return []string, bool *

func (*Mem) GetBool added in v1.0.12

func (s *Mem) GetBool(key string, def bool) (bool, bool)

* * GetBool * @param key string, def bool * @return bool, bool *

func (*Mem) GetDuration added in v1.0.12

func (s *Mem) GetDuration(key string, def time.Duration) (time.Duration, bool)

* * GetDuration * @param key string, def time.Duration * @return time.Duration, bool *

func (*Mem) GetFloat added in v1.0.12

func (s *Mem) GetFloat(key string, def float64) (float64, bool)

* * GetFloat * @param key string, def float64 * @return float64, bool *

func (*Mem) GetInt added in v1.0.12

func (s *Mem) GetInt(key string, def int) (int, bool)

* * GetInt * @param key string, def int * @return int, bool *

func (*Mem) GetInt64 added in v1.0.12

func (s *Mem) GetInt64(key string, def int64) (int64, bool)

* * GetInt64 * @param key string, def int * @return int, error *

func (*Mem) GetItem added in v1.0.12

func (s *Mem) GetItem(key string) (*Item, bool)

* * GetItem * @param key string, dest *Item * @return bool, error *

func (*Mem) GetJson added in v1.0.12

func (s *Mem) GetJson(key string, def et.Json) (et.Json, bool)

* * GetJson * @param key string, def et.Json * @return et.Json, error *

func (*Mem) GetStr added in v1.0.12

func (s *Mem) GetStr(key string) (string, bool)

* * GetStr * @param key string * @return string *

func (*Mem) GetTime added in v1.0.12

func (s *Mem) GetTime(key string, def time.Time) (time.Time, bool)

* * GetTime * @param key string, def time.Time * @return time.Time, bool *

func (*Mem) Keys

func (s *Mem) Keys() []string

* * Keys * @return []string *

func (*Mem) Len

func (s *Mem) Len() int

* * Len * @return int *

func (*Mem) More

func (s *Mem) More(key string, expiration time.Duration) int64

* * More * @param key string * @param expiration time.Duration * @return int *

func (*Mem) Set

func (s *Mem) Set(key string, value interface{}, expiration time.Duration) *Item

* * Set * @param key string, value interface{}, expiration time.Duration * @return interface{} *

func (*Mem) Type

func (s *Mem) Type() string

* * Type * @return string *

func (*Mem) Values

func (s *Mem) Values() []string

* * Values * @return []string *

type Peticiones

type Peticiones struct {
	Peticiones int
	Capacity   int /* Capacidad de peticiones del ACS */
	TimeWait   int /* Tiempo de espera para la siguiente petición */
	SizeStack  int /* Tamaño de la pila de peticiones */
	// contains filtered or unexported fields
}

func NewPeticiones

func NewPeticiones(capacity, timeWait int) *Peticiones

func (*Peticiones) Ejecucion

func (c *Peticiones) Ejecucion(executeFc func(params et.Json) (et.Items, error), params et.Json) (et.Items, error)

func (*Peticiones) GetConfig

func (c *Peticiones) GetConfig() et.Json

func (*Peticiones) GetPeticiones

func (c *Peticiones) GetPeticiones() int

Jump to

Keyboard shortcuts

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