func (c *Config) RegisterFlagsWithPrefix(prefix string, f *pflag.FlagSet) {
	f.BoolVar(&c.Enable, prefix+"rediscluster.enable", c.Enable, "define whether the component is enabled")
	f.StringSliceVar(&c.Addresses, prefix+"rediscluster.addr", c.Addresses, "redis address(ip:port format), support multiple calls to form a redis cluster")
	f.StringVar(&c.Password, prefix+"rediscluster.password", c.Password, "redis password")
	f.StringVar(&c.Prefix, prefix+"rediscluster.prefix", c.Prefix, "storage prefix")
}
RegisterFlagsWithPrefix is used to register flags
package rediscluster
import (
	"context"
	"errors"
	"strings"
	"sync"
	"time"
	"github.com/go-redis/redis/v8"
	"github.com/prometheus/client_golang/prometheus"
	"github.com/spf13/pflag"
	"github.com/bilibili-base/powermock/pkg/pluginregistry"
	"github.com/bilibili-base/powermock/pkg/util"
	"github.com/bilibili-base/powermock/pkg/util/logger"
)
var _ pluginregistry.StoragePlugin = &Plugin{}
type Plugin struct {
	cfg *Config
	client     *redis.ClusterClient
	registerer prometheus.Registerer
	logger.Logger
	announcement chan struct{}
}
type Config struct {
	Enable    bool
	Addresses []string
	Password  string
	Prefix    string
}
func NewConfig() *Config {
	return &Config{
		Enable: false,
		Addresses: []string{
			"127.0.0.1:6379",
		},
		Prefix: "/powermock/",
	}
}
func (c *Config) IsEnabled() bool {
	return c.Enable
}