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

Method CreateSubscription

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

CreateSubscription subscribes to events of the given types for the resource at resourceURL. Creation is idempotent: an active subscription for the same resource and set of event types is returned as is, and created reports whether the subscription is new.

(ctx context.Context, resourceURL string, eventTypes []string)

Source from the content-addressed store, hash-verified

45 // idempotent: an active subscription for the same resource and set of event types is returned as is, and created
46 // reports whether the subscription is new.
47 CreateSubscription(ctx context.Context, resourceURL string, eventTypes []string) (sub *Subscription, created bool, err error)
48 // GetSubscription returns the active subscription with the given ID.
49 GetSubscription(ctx context.Context, id string) (*Subscription, error)
50 // ListSubscriptions returns up to limit of the caller's active subscriptions, newest first. The limit must be

Callers 5

TestCreateSubscriptionFunction · 0.65
TestClientErrorsFunction · 0.65
createRunFunction · 0.65
subscribeMethod · 0.65

Implementers 2

EventClientMockpkg/cmd/event/client/client_mock.go
eventClientpkg/cmd/event/client/client.go

Calls

no outgoing calls

Tested by 3

TestCreateSubscriptionFunction · 0.52
TestClientErrorsFunction · 0.52