EventClientFunc returns a function that builds an event client for a host, using the factory's HTTP client.
(f *cmdutil.Factory)
| 7 | |
| 8 | // EventClientFunc returns a function that builds an event client for a host, using the factory's HTTP client. |
| 9 | func EventClientFunc(f *cmdutil.Factory) func(host string) (client.EventClient, error) { |
| 10 | return func(host string) (client.EventClient, error) { |
| 11 | httpClient, err := f.HttpClient() |
| 12 | if err != nil { |
| 13 | return nil, err |
| 14 | } |
| 15 | return client.NewEventClient(httpClient, host), nil |
| 16 | } |
| 17 | } |
no test coverage detected