()
| 151 | } |
| 152 | |
| 153 | func ExampleService_Info() { |
| 154 | nc, err := nats.Connect("127.0.0.1:4222") |
| 155 | if err != nil { |
| 156 | log.Fatal(err) |
| 157 | } |
| 158 | defer nc.Close() |
| 159 | |
| 160 | config := micro.Config{ |
| 161 | Name: "EchoService", |
| 162 | } |
| 163 | |
| 164 | srv, _ := micro.AddService(nc, config) |
| 165 | |
| 166 | // service info |
| 167 | info := srv.Info() |
| 168 | |
| 169 | fmt.Println(info.ID) |
| 170 | fmt.Println(info.Name) |
| 171 | fmt.Println(info.Description) |
| 172 | fmt.Println(info.Version) |
| 173 | fmt.Println(info.Endpoints) |
| 174 | } |
| 175 | |
| 176 | func ExampleService_Stats() { |
| 177 | nc, err := nats.Connect("127.0.0.1:4222") |
nothing calls this directly
no test coverage detected