Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
kiwi/doc.go
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40 lines (39 sloc)
1.19 KB
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
// Copyright (c) 2020 SDSLabs | |
// Use of this source code is governed by an MIT license | |
// details of which can be found in the LICENSE file. | |
// Package kiwi implements a minimalistic in-memory key value store. | |
// | |
// Each key is thread safe as it is protected by its own mutex, though different | |
// keys can be accessed by various threads. | |
// | |
// To get started, create a store with the NewStore function and add keys to it | |
// using AddKey. Each key is associated with a value which has a specific type. | |
// These types are extendible and can be created by implementing the Value interface. | |
// | |
// Store can also be initialized with a schema, which is basically a map of keys | |
// and value types. | |
// | |
// | |
// Get Started | |
// | |
// Create a store, add key and play with it. It's that easy! | |
// | |
// store := kiwi.NewStore() | |
// | |
// if err := store.AddKey("my_string", "str"); err != nil { | |
// // handle error | |
// } | |
// | |
// if _, err := store.Do("my_string", "UPDATE", "Hello, World!"); err != nil { | |
// // handle error | |
// } | |
// | |
// v, err := store.Do("my_string", "GET") | |
// if err != nil { | |
// // handle error | |
// } | |
// | |
// fmt.Println(v.(string)) // Hello, World! | |
// | |
// For documentation visit https://kiwi.sdslabs.co/docs/ | |
package kiwi |