(conn net.Conn, p *BlockCachePacket)
| 204 | } |
| 205 | |
| 206 | func (s *bcacheStore) handlePacket(conn net.Conn, p *BlockCachePacket) (err error) { |
| 207 | switch p.Opcode { |
| 208 | case OpBlockCachePut: |
| 209 | err = s.opBlockCachePut(conn, p) |
| 210 | case OpBlockCacheGet: |
| 211 | err = s.opBlockCacheGet(conn, p) |
| 212 | case OpBlockCacheDel: |
| 213 | err = s.opBlockCacheEvict(conn, p) |
| 214 | default: |
| 215 | err = fmt.Errorf("unknown Opcode: %d", p.Opcode) |
| 216 | } |
| 217 | return |
| 218 | } |
| 219 | |
| 220 | func (s *bcacheStore) opBlockCachePut(conn net.Conn, p *BlockCachePacket) (err error) { |
| 221 | req := &PutCacheRequest{} |
no test coverage detected