func (s *ExampleStateMachine) Update(data []byte) (sm.Result, error) {
	s.Count++
	fmt.Printf("from ExampleStateMachine.Update(), msg: %s, count:%d\n",
		string(data), s.Count)
	return sm.Result{Value: uint64(len(data))}, nil
}
Update updates the object using the specified committed raft entry.
package main
import (
	"encoding/binary"
	"fmt"
	"io"
	"io/ioutil"
	sm "github.com/lni/dragonboat/v3/statemachine"
)
type ExampleStateMachine struct {
	ClusterID uint64
	NodeID    uint64
	Count     uint64
}
func NewExampleStateMachine(clusterID uint64,
	nodeID uint64) sm.IStateMachine {
	return &ExampleStateMachine{
		ClusterID: clusterID,
		NodeID:    nodeID,
		Count:     0,
	}
}
func (s *ExampleStateMachine) Lookup(query interface{}) (interface{}, error) {
	result := make([]byte, 8)
	binary.LittleEndian.PutUint64(result, s.Count)
	return result, nil
}