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

Function NewEventClient

pkg/cmd/event/client/client.go:77–79  ·  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

75
76// NewEventClient returns an EventClient that sends requests for host through httpClient.
77func NewEventClient(httpClient *http.Client, host string) EventClient {
78 return &eventClient{api: api.NewClientFromHTTP(httpClient), host: host}
79}
80
81func (c *eventClient) CreateSubscription(ctx context.Context, resourceURL string, eventTypes []string) (*Subscription, bool, error) {
82 if !SupportedHost(c.host) {

Callers 2

EventClientFuncFunction · 0.92
newTestClientFunction · 0.85

Calls 1

NewClientFromHTTPFunction · 0.92

Tested by 1

newTestClientFunction · 0.68