MCPcopy Create free account
hub / github.com/cli/cli / EventClientFunc

Function EventClientFunc

pkg/cmd/event/shared/client.go:9–17  ·  view source on GitHub ↗

EventClientFunc returns a function that builds an event client for a host, using the factory's HTTP client.

(f *cmdutil.Factory)

Source from the content-addressed store, hash-verified

7
8// EventClientFunc returns a function that builds an event client for a host, using the factory's HTTP client.
9func 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}

Callers 5

NewCmdDeleteFunction · 0.92
NewCmdViewFunction · 0.92
NewCmdListFunction · 0.92
NewCmdCreateFunction · 0.92
NewCmdListenFunction · 0.92

Calls 1

NewEventClientFunction · 0.92

Tested by

no test coverage detected