func (d *DMap) Delete(key string) error {
	req := protocol.NewDMapMessage(protocol.OpDelete)
	req.SetDMap(d.name)
	req.SetKey(key)
	resp, err := d.request(req)
	if err != nil {
		return err
	}
	return checkStatusCode(resp)
}
Delete deletes the value for the given key. Delete will not return error if key doesn't exist.
It's thread-safe. It is safe to modify the contents of the argument after Delete returns.
package client
import (
	"fmt"
	"reflect"
	"time"
	"github.com/buraksezer/olric"
	"github.com/buraksezer/olric/internal/protocol"
	"github.com/buraksezer/olric/pkg/storage"
)
type DMap struct {
	*Client
	entryFormat storage.Entry
	name        string
}
func (d *DMap) Get(key string) (interface{}, error) {
	req := protocol.NewDMapMessage(protocol.OpGet)
	req.SetDMap(d.name)
	req.SetKey(key)
	resp, err := d.request(req)
	if err != nil {
		return nil, err
	}
	if err := checkStatusCode(resp); err != nil {
		return nil, err
	}
	entry := d.getEntryFormat(d.name)
	entry.Decode(resp.Value())
	return d.unmarshalValue(entry.Value())
}
func (d *DMap) GetEntry(key string) (*olric.Entry, error) {
	req := protocol.NewDMapMessage(protocol.OpGet)
	req.SetDMap(d.name)
	req.SetKey(key)
	resp, err := d.request(req)
	if err != nil {
		return nil, err
	}
	if err := checkStatusCode(resp); err != nil {
		return nil, err
	}
	entry := d.getEntryFormat(d.name)
	entry.Decode(resp.Value())
	value, err := d.unmarshalValue(entry.Value())
	if err != nil {
		return nil, err
	}
	return &olric.Entry{
		Key:       entry.Key(),
		TTL:       entry.TTL(),
		Timestamp: entry.Timestamp(),
		Value:     value,
	}, nil
}
func (d *DMap) Put(key string, value interface{}) error {
	data, err := d.serializer.Marshal(value)
	if err != nil {
		return err
	}
	req := protocol.NewDMapMessage(protocol.OpPut)
	req.SetDMap(d.name)
	req.SetKey(key)
	req.SetValue(data)
	req.SetExtra(protocol.PutExtra{
		Timestamp: time.Now().UnixNano(),
	})
	resp, err := d.request(req)
	if err != nil {
		return err
	}
	return checkStatusCode(resp)
}
func (d *DMap) PutEx(key string, value interface{}, timeout time.Duration) error {
	data, err := d.serializer.Marshal(value)
	if err != nil {
		return err
	}
	req := protocol.NewDMapMessage(protocol.OpPutEx)
	req.SetDMap(d.name)
	req.SetKey(key)
	req.SetValue(data)
	req.SetExtra(protocol.PutExExtra{
		TTL:       timeout.Nanoseconds(),
		Timestamp: time.Now().UnixNano(),
	})
	resp, err := d.request(req)
	if err != nil {
		return err
	}
	return checkStatusCode(resp)
}