Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bag ¶
type Bag struct { // Data is the data inside the state bag. This shouldn't be set // directly. The Get and Set methods should be used instead. Accessing // it directly can result in undefined behavior. Data map[string]interface{} }
Bag is a collection of state accessible by key. It is effectively a hash table that has slightly richer higher level functions built on top.
Otto uses this throughout the core system in order to pass arbitrary data around.
A Bag is not thread-safe. Concurrent read/write access should be protected by a lock. Concurrent read-only access is safe.
NOTE: At time of writing, this is basically just syntactic sugar over a hash. Richer methods will be added over time.
Click to show internal directories.
Click to hide internal directories.