Documentation
¶
Index ¶
- func GetLocal[T any](localSession *Local, key []byte) (*T, error)
- func IsAlreadyExists(err error) bool
- func IsNotExists(err error) bool
- func IsNotMatchType(err error) bool
- func IsTimeout(err error) bool
- func RemoveLocal[T any](localSession *Local, key []byte) (*T, error)
- func SetLocal[T any](localSession *Local, key []byte, value T) error
- func StartGC(localSession *Local)
- type Local
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLocal ¶
GetLocal is getting the value of given key. if not exists, return Not Exists Error. if not match type with generic, return Not Match Type Error.
func IsAlreadyExists ¶
IsAlreadyExists is a function to check given error is Already Exists Error
func IsNotExists ¶
IsNotExists is a function to check given error is Not Exists Error
func IsNotMatchType ¶
IsNotMatchType is a function to check given error is Not Match Type Error
func RemoveLocal ¶
RemoveLocal is deleting key value pair in local session. if not exists, return Not Exists Error. if not match type with generic, return Not Match Type Error.
Types ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local is a session of app scope
func (*Local) DecreaseCount ¶
func (l *Local) DecreaseCount()
DecreaseCount is decreasing count of local session
func (*Local) IncreaseCount ¶
func (l *Local) IncreaseCount()
IncreaseCount is increasing count of local session