Skip to content

Instantly share code, notes, and snippets.

@d6y
Created October 6, 2012 12:04
Show Gist options
  • Select an option

  • Save d6y/3844746 to your computer and use it in GitHub Desktop.

Select an option

Save d6y/3844746 to your computer and use it in GitHub Desktop.
val sns: Option[SNS] = // configure SNS
implicit def pimpActor(actor: LiftActor) = new {
def >![T](msg: T)(implicit s: SNSSerializer[T]) = sns match {
case Some(service) => service ! Publish(s.write(msg))
case _ => actor ! msg
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment