Documentation ¶ Index ¶ type Map func NewMap[T proto.Message]() *Map[T] func (m *Map[T]) Read(ctx context.Context, key string, version string) (T, string, error) func (m *Map[T]) Update(key string, value T) string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Map ¶ type Map[T proto.Message] struct { // contains filtered or unexported fields } Map is a simple, versioned, map. func NewMap ¶ func NewMap[T proto.Message]() *Map[T] func (*Map[T]) Read ¶ func (m *Map[T]) Read(ctx context.Context, key string, version string) (T, string, error) Read gets the value and the version associated with a key. If version is the empty string, then read gets the latest value of the key, along with its version; otherwise it blocks until the latest value of the key is newer than the provided version. func (*Map[T]) Update ¶ func (m *Map[T]) Update(key string, value T) string Update (over)writes the value for a key with value. Source Files ¶ View all Source files map.go Click to show internal directories. Click to hide internal directories.