mem

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 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 Exists added in v1.0.14

func Exists(key string) bool

* * Exists * @param key string * @return bool *

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, error)

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

func GetBool added in v1.0.12

func GetBool(key string) (bool, bool, error)

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

func GetDuration added in v1.0.12

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

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

func GetFloat64 added in v1.0.12

func GetFloat64(key string) (float64, bool, error)

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

func GetInt added in v1.0.12

func GetInt(key string) (int, bool, error)

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

func GetInt64 added in v1.0.12

func GetInt64(key string) (int64, bool, error)

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

func GetJson added in v1.0.12

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

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

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, error)

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

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) (int64, error)

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

func Values

func Values() []string

* * Values * @return []string *

Types

type Entry added in v1.0.14

type Entry struct {
	Key        string
	Value      []byte
	Version    int
	LastUpdate time.Time
	Expiration time.Duration
}

func GetEntry added in v1.0.14

func GetEntry(key string) (*Entry, bool)

* * GetEntry * @param key string * @return *Entry, bool *

func New

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

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

func Set

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

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

func (*Entry) ArrayDuration added in v1.0.14

func (s *Entry) ArrayDuration() ([]time.Duration, error)

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

func (*Entry) ArrayFloat added in v1.0.14

func (s *Entry) ArrayFloat() ([]float64, error)

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

func (*Entry) ArrayInt added in v1.0.14

func (s *Entry) ArrayInt() ([]int, error)

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

func (*Entry) ArrayJson added in v1.0.14

func (s *Entry) ArrayJson() ([]et.Json, error)

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

func (*Entry) ArrayMap added in v1.0.14

func (s *Entry) ArrayMap() ([]map[string]interface{}, error)

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

func (*Entry) ArrayStr added in v1.0.14

func (s *Entry) ArrayStr() ([]string, error)

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

func (*Entry) ArrayTime added in v1.0.14

func (s *Entry) ArrayTime() ([]time.Time, error)

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

func (*Entry) Bool added in v1.0.14

func (s *Entry) Bool() (bool, error)

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

func (*Entry) Duration added in v1.0.14

func (s *Entry) Duration() (time.Duration, error)

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

func (*Entry) Float added in v1.0.14

func (s *Entry) Float() (float64, error)

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

func (*Entry) Get added in v1.0.14

func (s *Entry) Get() []byte

* * Get a value from item * @return []byte *

func (*Entry) Int added in v1.0.14

func (s *Entry) Int() (int, error)

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

func (*Entry) Int64 added in v1.0.14

func (s *Entry) Int64() (int64, error)

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

func (*Entry) Json added in v1.0.14

func (s *Entry) Json() (et.Json, error)

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

func (*Entry) Map added in v1.0.14

func (s *Entry) Map() (map[string]interface{}, error)

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

func (*Entry) Set added in v1.0.14

func (s *Entry) Set(value interface{}, expiration time.Duration) (*Entry, error)

* * Set a value in item * @param value interface{}, expiration time.Duration * @return *Entry, error *

func (*Entry) Str added in v1.0.14

func (s *Entry) Str() string

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

func (*Entry) Time added in v1.0.14

func (s *Entry) Time() (time.Time, error)

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

type Mem

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

func Load

func Load() *Mem

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) Exists added in v1.0.14

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

* * Exists * @param key string * @return bool *

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, error)

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

func (*Mem) GetArrayInt added in v1.0.12

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

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

func (*Mem) GetArrayJson added in v1.0.12

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

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

func (*Mem) GetArrayStr added in v1.0.12

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

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

func (*Mem) GetBool added in v1.0.12

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

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

func (*Mem) GetDuration added in v1.0.12

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

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

func (*Mem) GetEntry added in v1.0.14

func (s *Mem) GetEntry(key string) (*Entry, bool)

* * GetEntry * @param key string, dest *Entry * @return bool, error *

func (*Mem) GetFloat added in v1.0.12

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

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

func (*Mem) GetInt added in v1.0.12

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

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

func (*Mem) GetInt64 added in v1.0.12

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

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

func (*Mem) GetJson added in v1.0.12

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

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

func (*Mem) GetStr added in v1.0.12

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

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

func (*Mem) GetTime added in v1.0.12

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

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

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, error)

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

func (*Mem) Set

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

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

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