Documentation
¶
Index ¶
- func Clear(match string)
- func Delete(key string) bool
- func Empty()
- func Exists(key string) bool
- func Get(key string) (interface{}, bool)
- func GetArrayJson(key string) ([]et.Json, bool, error)
- func GetBool(key string) (bool, bool, error)
- func GetDuration(key string) (time.Duration, bool, error)
- func GetFloat64(key string) (float64, bool, error)
- func GetInt(key string) (int, bool, error)
- func GetInt64(key string) (int64, bool, error)
- func GetJson(key string) (et.Json, bool, error)
- func GetStr(key string) (string, bool)
- func GetTime(key string) (time.Time, bool, error)
- func Keys() []string
- func Len() int
- func More(key string, expiration time.Duration) (int64, error)
- func Values() []string
- type Entry
- func (s *Entry) ArrayDuration() ([]time.Duration, error)
- func (s *Entry) ArrayFloat() ([]float64, error)
- func (s *Entry) ArrayInt() ([]int, error)
- func (s *Entry) ArrayJson() ([]et.Json, error)
- func (s *Entry) ArrayMap() ([]map[string]interface{}, error)
- func (s *Entry) ArrayStr() ([]string, error)
- func (s *Entry) ArrayTime() ([]time.Time, error)
- func (s *Entry) Bool() (bool, error)
- func (s *Entry) Duration() (time.Duration, error)
- func (s *Entry) Float() (float64, error)
- func (s *Entry) Get() []byte
- func (s *Entry) Int() (int, error)
- func (s *Entry) Int64() (int64, error)
- func (s *Entry) Json() (et.Json, error)
- func (s *Entry) Map() (map[string]interface{}, error)
- func (s *Entry) Set(value interface{}, expiration time.Duration) (*Entry, error)
- func (s *Entry) Str() string
- func (s *Entry) Time() (time.Time, error)
- type Mem
- func (s *Mem) Clear(match string)
- func (s *Mem) Delete(key string) bool
- func (s *Mem) Empty()
- func (s *Mem) Exists(key string) bool
- func (s *Mem) Get(key string) (interface{}, bool)
- func (s *Mem) GetArrayFloat(key string, def []float64) ([]float64, bool, error)
- func (s *Mem) GetArrayInt(key string, def []int) ([]int, bool, error)
- func (s *Mem) GetArrayJson(key string, def []et.Json) ([]et.Json, bool, error)
- func (s *Mem) GetArrayStr(key string, def []string) ([]string, bool, error)
- func (s *Mem) GetBool(key string, def bool) (bool, bool, error)
- func (s *Mem) GetDuration(key string, def time.Duration) (time.Duration, bool, error)
- func (s *Mem) GetEntry(key string) (*Entry, bool)
- func (s *Mem) GetFloat(key string, def float64) (float64, bool, error)
- func (s *Mem) GetInt(key string, def int) (int, bool, error)
- func (s *Mem) GetInt64(key string, def int64) (int64, bool, error)
- func (s *Mem) GetJson(key string, def et.Json) (et.Json, bool, error)
- func (s *Mem) GetStr(key string) (string, bool)
- func (s *Mem) GetTime(key string, def time.Time) (time.Time, bool, error)
- func (s *Mem) Keys() []string
- func (s *Mem) Len() int
- func (s *Mem) More(key string, expiration time.Duration) (int64, error)
- func (s *Mem) Set(key string, value interface{}, expiration time.Duration) (*Entry, error)
- func (s *Mem) Type() string
- func (s *Mem) Values() []string
- type Peticiones
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetArrayJson ¶ added in v1.0.12
* * GetArrayJson * @param key string * @return []et.Json, bool, error *
func GetDuration ¶ added in v1.0.12
* * GetDuration * @param key string * @return time.Duration, bool, error *
func GetFloat64 ¶ added in v1.0.12
* * GetFloat64 * @param key string * @return float64, bool, error *
Types ¶
type Entry ¶ added in v1.0.14
type Entry struct {
Key string
Value []byte
Version int
LastUpdate time.Time
Expiration time.Duration
}
func New ¶
* * New create new item * @param key string * @param value interface{} * @return *Entry *
func Set ¶
* * Set * @param key string, value interface{}, expiration time.Duration * @return *Entry *
func (*Entry) ArrayDuration ¶ added in v1.0.14
* * ArrayDuration return the value of item * @return []time.Duration, error *
func (*Entry) ArrayFloat ¶ added in v1.0.14
* * ArrayFloat return the value of item * @return []float64, error *
func (*Entry) ArrayInt ¶ added in v1.0.14
* * ArrayInt return the value of item * @return []int, error *
func (*Entry) ArrayJson ¶ added in v1.0.14
* * ArrayJson return the value of item * @return []et.Json, error *
func (*Entry) ArrayMap ¶ added in v1.0.14
* * ArrayMap return the value of item * @return []interface{}, error *
func (*Entry) ArrayStr ¶ added in v1.0.14
* * ArrayStr return the value of item * @return []string, error *
func (*Entry) ArrayTime ¶ added in v1.0.14
* * ArrayTime return the value of item * @return []time.Time, error *
func (*Entry) Duration ¶ added in v1.0.14
* * Duration return the value of item * @return time.Duration, error *
func (*Entry) Float ¶ added in v1.0.14
* * Float return the value of item * @return float64, error *
func (*Entry) Map ¶ added in v1.0.14
* * Map return the value of item * @return map[string]interface{}, error *
func (*Entry) Set ¶ added in v1.0.14
* * Set a value in item * @param value interface{}, expiration time.Duration * @return *Entry, error *
type Mem ¶
type Mem struct {
// contains filtered or unexported fields
}
func (*Mem) GetArrayFloat ¶ added in v1.0.12
* * GetArrayFloat * @param key string, def []float64 * @return []float64, bool, error *
func (*Mem) GetArrayInt ¶ added in v1.0.12
* * GetArrayInt * @param key string, def []int * @return []int, bool, error *
func (*Mem) GetArrayJson ¶ added in v1.0.12
* * GetArrayJson * @param key string, def []et.Json * @return []et.Json, bool, error *
func (*Mem) GetArrayStr ¶ added in v1.0.12
* * GetArrayStr * @param key string, def []string * @return []string, bool, error *
func (*Mem) GetBool ¶ added in v1.0.12
* * GetBool * @param key string, def bool * @return bool, bool, error *
func (*Mem) GetDuration ¶ added in v1.0.12
* * GetDuration * @param key string, def time.Duration * @return time.Duration, bool, error *
func (*Mem) GetEntry ¶ added in v1.0.14
* * GetEntry * @param key string, dest *Entry * @return bool, error *
func (*Mem) GetFloat ¶ added in v1.0.12
* * GetFloat * @param key string, def float64 * @return float64, bool, error *
func (*Mem) GetInt ¶ added in v1.0.12
* * GetInt * @param key string, def int * @return int, bool, error *
func (*Mem) GetInt64 ¶ added in v1.0.12
* * GetInt64 * @param key string, def int * @return int, error, bool *
func (*Mem) GetJson ¶ added in v1.0.12
* * GetJson * @param key string, def et.Json * @return et.Json, bool, error *
func (*Mem) GetTime ¶ added in v1.0.12
* * GetTime * @param key string, def time.Time * @return time.Time, bool, error *
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) GetConfig ¶
func (c *Peticiones) GetConfig() et.Json
func (*Peticiones) GetPeticiones ¶
func (c *Peticiones) GetPeticiones() int