()
| 307 | } |
| 308 | |
| 309 | func ExampleControlSubject() { |
| 310 | |
| 311 | // subject used to get PING from all services |
| 312 | subjectPINGAll, _ := micro.ControlSubject(micro.PingVerb, "", "") |
| 313 | fmt.Println(subjectPINGAll) |
| 314 | |
| 315 | // subject used to get PING from services with provided name |
| 316 | subjectPINGName, _ := micro.ControlSubject(micro.PingVerb, "CoolService", "") |
| 317 | fmt.Println(subjectPINGName) |
| 318 | |
| 319 | // subject used to get PING from a service with provided name and ID |
| 320 | subjectPINGInstance, _ := micro.ControlSubject(micro.PingVerb, "CoolService", "123") |
| 321 | fmt.Println(subjectPINGInstance) |
| 322 | |
| 323 | // Output: |
| 324 | // $SRV.PING |
| 325 | // $SRV.PING.CoolService |
| 326 | // $SRV.PING.CoolService.123 |
| 327 | } |
| 328 | |
| 329 | func ExampleRequest_Respond() { |
| 330 | handler := func(req micro.Request) { |
nothing calls this directly
no test coverage detected