typeInMemStorestruct{musync.Mutexbuf[]byte}// Save saves the state into the in-memory store.func(m*InMemStore)Save(state[]byte)error{m.mu.Lock()deferm.mu.Unlock()m.buf=statereturnnil}// Load loads the state from the in-memory store.func(m*InMemStore)Load()([]byte,error){m.mu.Lock()deferm.mu.Unlock()returnm.buf,nil}