func (t *StatefulSetHandler) ObjectUpdated(objOld, objNew interface{}) error {
	log.Info("StatefulSetHandler.ObjectUpdated")
	return nil
}
ObjectUpdated is called when an object is updated
package handlers
import (
	"errors"
	"strings"
	log "github.com/Sirupsen/logrus"
	appsv1 "k8s.io/api/apps/v1"
	"k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/watch"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/tools/cache"
)
type StatefulSetHandler struct{}
func GetStatefulSetInformer(client kubernetes.Interface) cache.SharedIndexInformer {
	informer := cache.NewSharedIndexInformer(
		&cache.ListWatch{
			ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
				return client.AppsV1().StatefulSets(AppNamespace).List(options)
			},
			WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
				return client.AppsV1().StatefulSets(AppNamespace).Watch(options)
			},
		},
		&appsv1.StatefulSet{},  
		0,                      
		cache.Indexers{},
	)
	return informer
}
func (t *StatefulSetHandler) Init() error {
	log.Info("StatefulSetHandler.Init")
	return nil
}
func ValidateStatefulSet(sts *appsv1.StatefulSet) bool {
	if sts.ObjectMeta.Name == "" {
		return false
	}
	if sts.ObjectMeta.Namespace == "" {
		return false
	}
	if sts.ObjectMeta.ResourceVersion == "" {
		return false
	}
	return true
}
func (t *StatefulSetHandler) ObjectCreated(obj interface{}) error {
	log.Info("StatefulSetHandler.ObjectCreated")
	defer func() {
		if r := recover(); r != nil {
			t.ObjectUpdated(obj, obj)
			return
		}
	}()
	statefulset := obj.(*appsv1.StatefulSet)
	if !ValidateStatefulSet(statefulset) {
		return errors.New("Could not validate statefulset object " + statefulset.ObjectMeta.Name)
	}
	SendJSONQueryWithRetries(statefulset, RestSvcEndpoint+"v1.1/entity?objtype=statefulset")
	return nil
}
func (t *StatefulSetHandler) ObjectDeleted(obj interface{}, key string) error {
	log.Info("StatefulSetHandler.ObjectDeleted")
	SendDeleteRequest(RestSvcEndpoint + "v1/entity/statefulset/statefulset:" + ClusterName + ":" + strings.Replace(key, "/", ":", -1))
	return nil
}