wolfeidau / lifx

Minimal lifx api for go
https://github.com/wolfeidau/lifx
MIT License
20 stars 4 forks source link

add more support for read operations around tags #9

Closed theckman closed 9 years ago

theckman commented 9 years ago

This adds more features around LIFX tags. In particular, it adds the ability to obtain all known tags within the cluster.

This works by adding additional packet decoders, and update triggers within processCommandEvent(). Using a mutex, the tags map is then kept up to date by automatically pulling labels whenever a tagsCommand packet is seen.

The data structure is map[uint64][]byte. The uint64 being the tag's ID, and the byte slice being the label name.

wolfeidau commented 9 years ago

:+1: