Attribute
查看 MarkdownThis page lists the Go SDK names for Attributes. The doc comment of each API gives its parameters, defaults, and errors. Read them in the Go SDK API reference.
API names
| Task | Go API | Dex behavior |
|---|---|---|
| Define a singleton Attribute | DefineAttribute, which returns an Attribute | Attributes |
| Define an AttributeMap | DefineAttributeMap, which returns an AttributeMap | Attributes |
| Declare it in the Flow | Attributes of PersistenceSchema, returned from GetPersistenceSchema | Flow definition |
| Read, write, and delete a value in a Step or RPC | Get, Set, and Delete | Commits |
| Address one AttributeMap instance | The instance argument of AttributeMap.Get, AttributeMap.Set, and AttributeMap.Delete | Attributes |
| Count AttributeMap instances and list their keys | AttributeMap.MapSize and AttributeMap.AllInstanceKeys | Selective state loading |
| Load AttributeMap values for a method | AttributeMap.Load, with the load fields of StepOptions or RPCOptions | Selective state loading |
| Lock a value for a read-modify-write | LockAttribute and LockAttributeMap, with the lock fields of StepOptions or LockAttributes of RPCOptions | Locks |
| Index a value for search | Indexed, with AttributeIndex and IndexType | Indexes |
| Project writes to an Attribute Store | SyncToAttributeStore | Attribute sync |
| Store a value that can be erased | HardDeleteOnNull | Hard-delete Attributes |
| Set a value when the Flow starts | InitialAttribute and InitialAttributeMapValue in StartFlowOptions.Attributes | Attributes at start |
| Read values from outside the Flow | Client.GetAttributes, with ReadAttribute and ReadAttributeMapInstance | Read Attributes |
| Wait until a value matches | Client.WaitForAttributeMatch and Client.WaitForAttributeMapInstanceMatch, with an AttributeMatch such as AttributeMatchEqual | Wait for an Attribute match |