code: func raftMessageStructSize(m *raftpb.Message) int {
  	return (&api.ProcessRaftMessageRequest{Message: m}).Size() - len(m.Snapshot.Data)
  }
docs: // Returns the raft message struct size (not including the payload size) for the given raftpb.Message.
  // The payload is typically the snapshot or append entries.