Tag Juju

Managing my personal server using juju

I have a personal server (actually a digital ocean droplet) that I use to host my private git repositories, bip irc client and blog. Until now this was a manually set up ubuntu instance that I set up to update automatically and would ssh into every once in a while to check the logs and update configurations. In other words, not very optimal. Since I spend my work hours contributing to juju - a service orchestration tool for the cloud, I decided to try it out managing just a single server running the services I need:

A cool golang interface trick

While working on juju, I noticed a curious code snippet: var ( stepPrepare = executorStep{"preparing", Operation.Prepare} stepExecute = executorStep{"executing", Operation.Execute} stepCommit = executorStep{"committing", Operation.Commit} ) where Operation is an interface: type Operation interface { Prepare(state State) (*State, error) Execute(state State) (*State, error) Commit(state State) (*State, error) } Surely, storing a method of an interface definition as a variable makes no sense. But then again, what is the type of an interface method?