// Folder returns an instance of Storage backed by the local // file system. Each key is a file at the provided path. func Folder(path string) Storage { if path == "" { return local.New() } return folder.New(path) }
// Redis returns an instance of Storage backed by a Redis service. func Redis(host, port string) Storage { if host == "" || port == "" { return local.New() } return redis.New(host, port) }
// Local returns an instance of Storage backed only by the // memory of the running binary. func Local() Storage { return local.New() }