Adapter runs an unknown service discovery implementation and converts its target groups to JSON and writes to a file for file_sd.
| 48 | // Adapter runs an unknown service discovery implementation and converts its target groups |
| 49 | // to JSON and writes to a file for file_sd. |
| 50 | type Adapter struct { |
| 51 | ctx context.Context |
| 52 | disc discovery.Discoverer |
| 53 | groups map[string]*customSD |
| 54 | manager *discovery.Manager |
| 55 | output string |
| 56 | name string |
| 57 | logger *slog.Logger |
| 58 | } |
| 59 | |
| 60 | func mapToArray(m map[string]*customSD) []customSD { |
| 61 | arr := make([]customSD, 0, len(m)) |
nothing calls this directly
no outgoing calls
no test coverage detected