gl

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientIp = "glClientIp"
	Tag      = "glTag"
	LogId    = "glLogId"
)

Variables

This section is empty.

Functions

func BatchGet

func BatchGet(keys []interface{}) map[interface{}]interface{}

func Close

func Close()

func CurrentGlData

func CurrentGlData() map[string]interface{}

func Del

func Del(key interface{})

func Get

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

func Init

func Init()

func Set

func Set(key interface{}, val interface{})

func SetLogger

func SetLogger(l Logger)

Types

type ConcurrentMap

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

func NewShard

func NewShard(shardCount int) *ConcurrentMap

func (*ConcurrentMap) Get

func (m *ConcurrentMap) Get(key string) (interface{}, bool)

func (*ConcurrentMap) GetShard

func (m *ConcurrentMap) GetShard(key string) *Shard

func (*ConcurrentMap) Remove

func (m *ConcurrentMap) Remove(key string)

func (*ConcurrentMap) Set

func (m *ConcurrentMap) Set(key string, value interface{})

type Logger

type Logger interface {
	Debug(format interface{}, v ...interface{})
	Info(format interface{}, v ...interface{})
	Error(format interface{}, v ...interface{}) error
}

type Shard

type Shard struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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