-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from aerospike/develop
v0.7.0
- Loading branch information
Showing
38 changed files
with
762 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/kotlin/com/aerospike/skyhook/handler/redis/LolwutCommandHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.aerospike.skyhook.handler.redis | ||
|
||
import com.aerospike.skyhook.command.RequestCommand | ||
import com.aerospike.skyhook.handler.CommandHandler | ||
import com.aerospike.skyhook.handler.NettyResponseWriter | ||
import com.aerospike.skyhook.listener.BaseListener | ||
import com.aerospike.skyhook.util.SystemUtils | ||
import io.netty.channel.ChannelHandlerContext | ||
|
||
class LolwutCommandHandler( | ||
private val ctx: ChannelHandlerContext | ||
) : NettyResponseWriter(), CommandHandler { | ||
|
||
override fun handle(cmd: RequestCommand) { | ||
require(cmd.argCount <= 3) { BaseListener.argValidationErrorMsg(cmd) } | ||
|
||
writeSimpleString(ctx, "Skyhook ver. ${SystemUtils.version}\n") | ||
ctx.flush() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/kotlin/com/aerospike/skyhook/listener/ValueType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.aerospike.skyhook.listener | ||
|
||
/** | ||
* Redis supported value types. | ||
*/ | ||
enum class ValueType(val str: String) { | ||
STRING("string"), | ||
LIST("list"), | ||
SET("set"), | ||
ZSET("zset"), | ||
HASH("hash"), | ||
STREAM("stream"); | ||
|
||
companion object { | ||
fun valueOf(ba: ByteArray) = valueOf(String(ba).toUpperCase()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.