Documentation
¶
Overview ¶
Package codec contains sub-packages with different codecs that can be used to encode and decode entities in Rainstorm.
Example ¶
// The examples below show how to set up all the codecs shipped with Rainstorm.
// Proper error handling left out to make it simple.
var gobDb, _ = rainstorm.Open("gob.db", rainstorm.Codec(gob.Codec))
var jsonDb, _ = rainstorm.Open("json.db", rainstorm.Codec(json.Codec))
var msgpackDb, _ = rainstorm.Open("msgpack.db", rainstorm.Codec(msgpack.Codec))
var serealDb, _ = rainstorm.Open("sereal.db", rainstorm.Codec(sereal.Codec))
var protobufDb, _ = rainstorm.Open("protobuf.db", rainstorm.Codec(protobuf.Codec))
fmt.Printf("%T\n", gobDb.Codec())
fmt.Printf("%T\n", jsonDb.Codec())
fmt.Printf("%T\n", msgpackDb.Codec())
fmt.Printf("%T\n", serealDb.Codec())
fmt.Printf("%T\n", protobufDb.Codec())
Output: *gob.gobCodec *json.jsonCodec *msgpack.msgpackCodec *sereal.serealCodec *protobuf.protobufCodec
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package gob contains a codec to encode and decode entities in Gob format
|
Package gob contains a codec to encode and decode entities in Gob format |
|
Package json contains a codec to encode and decode entities in JSON format
|
Package json contains a codec to encode and decode entities in JSON format |
|
Package msgpack contains a codec to encode and decode entities in msgpack format
|
Package msgpack contains a codec to encode and decode entities in msgpack format |
|
Package protobuf contains a codec to encode and decode entities in Protocol Buffer Package protobuf is a generated protocol buffer package.
|
Package protobuf contains a codec to encode and decode entities in Protocol Buffer Package protobuf is a generated protocol buffer package. |
|
Package sereal contains a codec to encode and decode entities using Sereal
|
Package sereal contains a codec to encode and decode entities using Sereal |
Click to show internal directories.
Click to hide internal directories.