func resyncPeriod(s *operatoropts.OperatorOpts) func() time.Duration {
	return func() time.Duration {
		factor := rand.Float64() + 1
		return time.Duration(float64(s.MinResyncPeriod.Nanoseconds()) * factor)
	}
}
resyncPeriod computes the time interval a shared informer waits before
resyncing with the api server.
package app
import (
	"context"
	"math/rand"
	"sync"
	"time"
	"github.com/golang/glog"
	kubeinformers "k8s.io/client-go/informers"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/tools/clientcmd"
	cluster "github.com/huanwei/rocketmq-operator/pkg/controllers/cluster"
	clientset "github.com/huanwei/rocketmq-operator/pkg/generated/clientset/versioned"
	informers "github.com/huanwei/rocketmq-operator/pkg/generated/informers/externalversions"
	operatoropts "github.com/huanwei/rocketmq-operator/pkg/options"
	signals "github.com/huanwei/rocketmq-operator/pkg/util/signals"
)