In lewis dot structure valence shell electrons are represented by dot so
Be Atomic no. 4, electronic config :- 2,2 thus 2 dots on Be.
Cl Atomic no. 17, electronic config :- 2,8,7 thus 7 dots on Cl.
As in the diag. below one can see that be electrons are given by X and Cl by sharing of one pair of electron leads to single bond. Thus one can see that octet is completed in case of Cl and Be in total occupy 4 electrons in Be.