Documentation ¶
Index ¶
- type Config
- type Logging
- type Server
- type YAKVS
- func (s *YAKVS) Clear()
- func (s *YAKVS) Get(key string) (value string, has bool)
- func (s *YAKVS) HasKey(key string) bool
- func (s *YAKVS) HasValue(value string) bool
- func (s *YAKVS) List() (keys []string, values []string, size int)
- func (s *YAKVS) Put(key, value string)
- func (s *YAKVS) Remove(key string)
- func (s *YAKVS) Size() int
- func (s *YAKVS) Start() error
- func (s *YAKVS) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config represents a set of configuration options for a YAKVS server.
type Logging ¶
type YAKVS ¶
type YAKVS struct {
// contains filtered or unexported fields
}
YAKVS represents a networked, in-memory, key-value store.
func NewServer ¶
NewServer creates a new key-value store. config is the server configuration settings.
func (*YAKVS) Get ¶
Get returns the value mapped to the specified key, or nil, as well as true if the mapping exists.
func (*YAKVS) HasKey ¶
HasKey returns true if the specified key has a mapping in this store.
func (*YAKVS) HasValue ¶
HasValue returns true if the specified value has a mapping in this store.
func (*YAKVS) List ¶
List returns a slice containing all keys in this store, a slice containing all values in this store, and the size of the store.
func (*YAKVS) Put ¶
Put adds a mapping from the specified value to the specified key.
func (*YAKVS) Remove ¶
Remove deletes a key-value mapping from this store. If the specified key does not have a mapping, nothing happens.
func (*YAKVS) Size ¶
Size returns the number of key-value mappings in this store.
func (*YAKVS) Start ¶
Start starts the network listener on the store. This method blocks while the server is running.