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

Function newTopic

pubsub/pubsub.go:347–356  ·  view source on GitHub ↗

newTopic makes a pubsub.Topic from a driver.Topic. opts may be nil to accept defaults.

(d driver.Topic, opts *batcher.Options)

Source from the content-addressed store, hash-verified

345//
346// opts may be nil to accept defaults.
347func newTopic(d driver.Topic, opts *batcher.Options) *Topic {
348 ctx, cancel := context.WithCancel(context.Background())
349 t := &Topic{
350 driver: d,
351 tracer: gcdkotel.NewTracer(pkgName, gcdkotel.ProviderName(d)),
352 cancel: cancel,
353 }
354 t.batcher = newSendBatcher(ctx, t, d, opts)
355 return t
356}
357
358const pkgName = "gocloud.dev/pubsub"
359

Callers

nothing calls this directly

Calls 1

newSendBatcherFunction · 0.85

Tested by

no test coverage detected