Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Conversation

@jiren
Copy link
Contributor

@jiren jiren commented Apr 1, 2019

  • Added tag class to store tag metadata
  • Refactor stats and tags code and test cases to manage tag class.

jiren added 2 commits April 1, 2019 18:42
- refactor stats and tags code to accommodate tag class
- updated test cases
@jiren
Copy link
Contributor Author

jiren commented Apr 23, 2019

@dazuma I am going to update tag structure for key, value (with metadata - ttl) something like this. Please let me know your suggestions.

class TagMap
  # @param [Hash<String,String>, Hash<String,TagValue>] tags
  def initialize tags = {}
    # Convert value to TagValue
  end

  # @param [String] key
  # @param [String, TagValue] value
  def []= key, value
    # Convert string to TagValue
  end
end

class TagValue
  attr_reader :value, :ttl

  # @param [String] value
  # @param [Integer, nil] ttl
  def initialize value, ttl: nil
  end
end

@dazuma
Copy link
Contributor

dazuma commented Apr 23, 2019

I think including the metadata in TagValue is confusing, since that's not how the spec describes the types. What's wrong with the existing classes?

@jiren
Copy link
Contributor Author

jiren commented Apr 24, 2019

I think including the metadata in TagValue is confusing, since that's not how the spec describes the types. What's wrong with the existing classes?

Nothing wrong with existing classes. It was just a view.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants