MCPcopy Create free account
hub / github.com/google/go-cloud / CreateSubscription

Method CreateSubscription

pubsub/gcppubsubv2/gcppubsub_test.go:99–102  ·  view source on GitHub ↗
(ctx context.Context, dt driver.Topic, testName string)

Source from the content-addressed store, hash-verified

97}
98
99func (h *harness) CreateSubscription(ctx context.Context, dt driver.Topic, testName string) (ds driver.Subscription, cleanup func(), err error) {
100 subName := fmt.Sprintf("%s-subscription-%d", sanitize(testName), atomic.AddUint32(&h.numSubs, 1))
101 return createSubscription(ctx, h.client, dt, subName)
102}
103
104func createSubscription(ctx context.Context, client *raw.Client, dt driver.Topic, subName string) (ds driver.Subscription, cleanup func(), err error) {
105 t := dt.(*topic)

Callers

nothing calls this directly

Calls 2

sanitizeFunction · 0.70
createSubscriptionFunction · 0.70

Tested by

no test coverage detected