MCPcopy Create free account
hub / github.com/dataddo/pgq / ExampleNewPublisher

Function ExampleNewPublisher

examples_test.go:39–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39func ExampleNewPublisher() {
40 hostname, _ := os.Hostname()
41 p := pgq.NewPublisher(db,
42 pgq.WithMetaInjectors(
43 pgq.StaticMetaInjector(pgq.Metadata{"publisher-id": hostname}),
44 ),
45 )
46 _ = p
47}

Callers

nothing calls this directly

Calls 3

NewPublisherFunction · 0.92
WithMetaInjectorsFunction · 0.92
StaticMetaInjectorFunction · 0.92

Tested by

no test coverage detected