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

Function NewEventClient

pkg/cmd/event/client/client.go:66–68  ·  view source on GitHub ↗

NewEventClient returns an EventClient that sends requests for host through httpClient.

(httpClient *http.Client, host string)

Source from the content-addressed store, hash-verified

64
65// NewEventClient returns an EventClient that sends requests for host through httpClient.
66func NewEventClient(httpClient *http.Client, host string) EventClient {
67 return &eventClient{api: api.NewClientFromHTTP(httpClient), host: host}
68}
69
70func (c *eventClient) CreateSubscription(ctx context.Context, resourceURL string, eventTypes []string) (*Subscription, bool, error) {
71 if !SupportedHost(c.host) {

Callers 2

EventClientFuncFunction · 0.92
newTestClientFunction · 0.85

Calls 1

NewClientFromHTTPFunction · 0.92

Tested by 1

newTestClientFunction · 0.68