Skip to content

Utility that generates a file for mass piping in the Redis key-value store

License

Notifications You must be signed in to change notification settings

duncanleo/gopipe-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gopipe-redis

Build Status

gopipe-redis is a small utility written in Go to generate a file for mass insertion into the key-value store Redis. It takes in a source file written using the human-readable Redis syntax.

Installation

$ go get github.com/duncanleo/gopipe-redis

Usage

$ gopipe-redis -i [source file]

Example

A sample source file, sample_source.txt, is included. Here's what it looks like:

SET price 99.99
SET color red
SET unit Celsius

Running this through the utility produces the following output:

*3
$3
SET
$5
price
$5
99.99
*3
$3
SET
$5
color
$3
red
*3
$3
SET
$4
unit
$7
Celsius

Using the command below, it can be piped into Redis' redis-cli command-line utility for mass insertion.

$ gopipe-redis -i sample_source.txt | redis-cli --pipe

About

Utility that generates a file for mass piping in the Redis key-value store

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages