To add custom functionality (like a custom Constrainer) to Chaos Monkey, you must implement the required interface, import the implementation into a custom main.go using a blank import to trigger its init() function, and then build a new binary.
This guide assumes your code resides in $GOPATH/src/example.com/chaosmonkey (replace example.com with your organization's domain).
### 1. Grab the open source Chaos Monkey source
```bash
go get github.com/netflix/chaosmonkey/cmd/chaosmonkey
2. Create a file with the custom constrainer implementation.
File: $GOPATH/src/example.com/chaosmonkey/constrainer.go
3. Create the file that loads the plugins
File: $GOPATH/src/example.com/chasmonkey/cmd/chaosmonkey/main.go
package main
import (
"github.com/Netflix/chaosmonkey/command"
_ "example.com/chaosmonkey/constrainer"
)
func main() {
command.Execute()
}
4. Build the custom Chaos Monkey binary
go build example.com/chaosmonkey/cmd/chaosmonkey