package rediswatcher import ( "github.com/google/uuid" "github.com/redis/go-redis/v9" ) type WatcherOptions struct { Options redis.Options ClusterOptions redis.ClusterOptions SubClient *redis.Client PubClient *redis.Client Channel string IgnoreSelf bool LocalID string OptionalUpdateCallback func(string) } func initConfig(option *WatcherOptions) { if option.LocalID == "" { option.LocalID = uuid.New().String() } if option.Channel == "" { option.Channel = "/casbin" } }