Documentation ¶
Index ¶
- func DeleteGls(goid int64)
- func Get(key interface{}) interface{}
- func GetGls(goid int64) map[interface{}]interface{}
- func GoID() int64
- func IsGlsEnabled(goid int64) bool
- func Remove(key interface{})
- func ResetGls(goid int64, initialValue map[interface{}]interface{})
- func Set(key interface{}, value interface{})
- func WithEmptyGls(f func()) func()
- func WithGls(f func()) func()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteGls ¶
func DeleteGls(goid int64)
DeleteGls remove goroutine local storage for specified goroutine
func GetGls ¶
func GetGls(goid int64) map[interface{}]interface{}
GetGls get goroutine local storage for specified goroutine if the goroutine did not set gls, it will return nil
func IsGlsEnabled ¶
IsGlsEnabled test if the gls is available for specified goroutine
func ResetGls ¶
func ResetGls(goid int64, initialValue map[interface{}]interface{})
ResetGls reset the goroutine local storage for specified goroutine
func Set ¶
func Set(key interface{}, value interface{})
Set key and element to goroutine local storage
func WithEmptyGls ¶
func WithEmptyGls(f func()) func()
WithEmptyGls works like WithGls, but do not inherit gls from parent goroutine.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.