func (r *Ring) Size() int {
	return (r.in - r.out + r.size) % r.size
}
Size return amount of keys in the ring
package list
type Ring struct {
	size int
	in   int
	out  int
	data []interface{}
}
func NewRing(size int) *Ring {
	r := &Ring{
		size: size,
		data: make([]interface{}, size),
	}
	return r
}