This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // MyHandler Defintion | |
| type MyHandler struct { | |
| newrelic *newrelic.Application | |
| configuration *configuration.Configuration | |
| myService *sling.Sling | |
| myDB dynamo.IClient | |
| } | |
| //New MyHandler constructor | |
| func NewMyHandler(newrelic *newrelic.Application, config *configuration.Configuration, service *sling.Sling, db dynamo.IClient) *BuilderMessageHandler { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func DoDBThing(newrelic *newrelic.Application, myDB dynamo.IClient, querythinger string) error { | |
| newrelic.txn() // whatever | |
| myDB.query(querythinger, s.newrelic) | |
| } | |
| func DoServiceThing(newrelic *newrelic.Application, myService *sling.Sling, querythinger string) error { | |
| newrelic.txn() // whatever | |
| myService.Do(querythinger, newrelic) | |
| } |
OlderNewer