Boolean function in place of Bernoulli Random variable A Bernoulli random variable $X: \Omega \to \{0,1\}$ is a function that maps each element of sample space $\Omega$ to 1 with probability $p$ and to 0 with probability $(1-p)$.
Suppose we have a function $f: \Omega \to \{0,1\}$, also known as a Boolean Function, which maps every element of the set $\Omega$ to either 1 or 0.
Now my understanding says that the definition of a random variable rub off to the definition of a function when we say that $\forall s \in \Omega f(s)$ takes either 1 or 0 with complete certainty. Which means function takes one value with probability $p=1$  and the other with probability $(1-p)=0$.
If what I’m interpreting is correct then can we interchange the use of Bernoulli random variable in probabilistic analysis tools like Chernoff bound with a Boolean function like $f$? What will be the expected value $E[f]$ in such tail bounds?
Or more clearly, for a subset $\{e_1,\dots,e_k\}$ of $\Omega$ can I make such Chernoff bound like claims for the function $f$
$$\operatorname { Pr }\left[\frac{\sum_{i \in [k]}f(e_i)}{k} \geq (1 + \delta)\mu \right] < e^{\frac{-\delta^2 \mu k}{4}}$$
 A: 
"A Bernoulli random variable $X: \Omega \to \{0,1\}$ is a function that maps each element of sample space $\Omega$ to $1$ with probability $p$ and to $0$ with probability $(1-p)$."

What you are implicitly saying here is that the statements $\forall\omega\in\Omega\; X(\omega)=1$ and $\forall\omega\in\Omega\; X(\omega)=0$ both are events (because they have a probability), this together with $P(\forall\omega\in\Omega\; X(\omega)=1)=p$ and $P(\forall\omega\in\Omega\; X(\omega)=0)=1-p$.
This is not correct: they can definitely not be recognized as events (which are measurable subsets of $\Omega$).
A correct formulation is:
A random variable $X$ equipped with Bernoulli($p$)-distribution is a measurable function $\Omega\to\mathbb R$ where $\Omega$ is the sample space of a probability space $(\Omega,\mathcal A,P)$ and where $P(\{\omega\in\Omega\mid X(\omega)=1\})=p$ and $P(\{\omega\in\Omega\mid X(\omega)=0\})=1-p$.
In lots of cases we have $X(\Omega)=\{0,1\}$ or equivalently in lots of cases $X$ is a Boolean function as described in your question.
