Documentation
¶
Overview ¶
Package vermap implements a key value map like used in session variables.
Index ¶
- type VerMap
- func (vm *VerMap) Compare(m map[string]string) (upd map[string]string, del map[string]bool)
- func (vm *VerMap) CompareWithRLock(m map[string]string) (upd map[string]string, del map[string]bool)
- func (vm *VerMap) Load() map[string]string
- func (vm *VerMap) LoadWithRLock() map[string]string
- func (vm *VerMap) Store(m map[string]string)
- func (vm *VerMap) Version() int64
- func (vm *VerMap) WithRLock(f func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VerMap ¶
type VerMap struct {
// contains filtered or unexported fields
}
A VerMap is a simple map[string]string keeping track changes via a version number. It is safe for concurrent use by multiple goroutines.
func (*VerMap) Compare ¶
Compare returns the changes (updates and deletes) in VarMap compared to map parameter m.
func (*VerMap) CompareWithRLock ¶
func (vm *VerMap) CompareWithRLock(m map[string]string) (upd map[string]string, del map[string]bool)
CompareWithRLock - same as Compare but needs to be executed in the context of method WithRLock.
func (*VerMap) LoadWithRLock ¶
LoadWithRLock - same as Load but needs to be executed in the context of method WithRLock.
Click to show internal directories.
Click to hide internal directories.