mem

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Datemake   time.Time
	Dateupdate time.Time
	Key        string
	Value      interface{}
	// contains filtered or unexported fields
}

func New added in v0.0.3

func New(key string, value interface{}) *Item

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

func (*Item) ArrayBool

func (i *Item) ArrayBool() []bool

* * ArrayBool return the value of item * @return []bool *

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() []js.Json

* * ArrayJson return the value of item * @return []js.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 added in v0.0.3

func (i *Item) Int64() int64

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

func (*Item) Json

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

* * Json return the value of item * @return js.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{}) 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 (c *Mem) Clear(match string)

* * Clear * @param match string *

func (*Mem) Del

func (c *Mem) Del(key string) bool

* * Del * @param key string * @return bool *

func (*Mem) Empty added in v0.0.3

func (c *Mem) Empty()

func (*Mem) Get

func (c *Mem) Get(key string, def string) (string, error)

* * Get * @param key string * @param def string * @return string * @return error *

func (*Mem) Keys

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

* * Keys * @return []string *

func (*Mem) Len

func (c *Mem) Len() int

* * Len * @return int *

func (*Mem) More added in v0.0.3

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

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

func (*Mem) Set

func (c *Mem) Set(key string, value string, expiration time.Duration) string

* * Set * @param key string * @param value string * @param expiration time.Duration * @return string *

func (*Mem) Type

func (c *Mem) Type() string

* * Type * @return string *

func (*Mem) Values

func (c *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 added in v0.0.3

func NewPeticiones(capacity, timeWait int) *Peticiones

func (*Peticiones) Ejecucion

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

func (*Peticiones) GetConfig

func (c *Peticiones) GetConfig() js.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