Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyValueStore ¶
type KeyValueStore struct {
// contains filtered or unexported fields
}
In-memory key-value store
func NewKeyValueStore ¶
func NewKeyValueStore() *KeyValueStore
func (*KeyValueStore) Clear ¶
func (kv *KeyValueStore) Clear()
func (*KeyValueStore) Get ¶
func (kv *KeyValueStore) Get(w http.ResponseWriter, r *http.Request)
Get value by key
func (*KeyValueStore) Set ¶
func (kv *KeyValueStore) Set(w http.ResponseWriter, r *http.Request)
Set value for a key
func (*KeyValueStore) SetVal ¶
func (kv *KeyValueStore) SetVal(key, val string)
type Server ¶
func StartHttpServer ¶
func StartHttpServer(kvStore *KeyValueStore) (error, *Server, func())
Click to show internal directories.
Click to hide internal directories.