Constructor
new Publisher(rpcImpl, requestDelimitedopt, responseDelimitedopt)
Constructs a new Publisher service.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
rpcImpl |
$protobuf.RPCImpl |
RPC implementation |
||
requestDelimited |
boolean |
<optional> |
false |
Whether requests are length-delimited |
responseDelimited |
boolean |
<optional> |
false |
Whether responses are length-delimited |
Extends
- $protobuf.rpc.Service
Methods
createTopic(request, callback) → {undefined}
Calls CreateTopic.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.ITopic |
Topic message or plain object |
callback |
google.pubsub.v1.Publisher.CreateTopicCallback |
Node-style callback called with the error, if any, and Topic |
Returns:
Type | Description |
---|---|
undefined |
createTopic(request) → {Promise.<google.pubsub.v1.Topic>}
Calls CreateTopic.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.ITopic |
Topic message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.pubsub.v1.Topic> |
Promise |
deleteTopic(request, callback) → {undefined}
Calls DeleteTopic.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IDeleteTopicRequest |
DeleteTopicRequest message or plain object |
callback |
google.pubsub.v1.Publisher.DeleteTopicCallback |
Node-style callback called with the error, if any, and Empty |
Returns:
Type | Description |
---|---|
undefined |
deleteTopic(request) → {Promise.<google.protobuf.Empty>}
Calls DeleteTopic.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IDeleteTopicRequest |
DeleteTopicRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.protobuf.Empty> |
Promise |
detachSubscription(request, callback) → {undefined}
Calls DetachSubscription.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IDetachSubscriptionRequest |
DetachSubscriptionRequest message or plain object |
callback |
google.pubsub.v1.Publisher.DetachSubscriptionCallback |
Node-style callback called with the error, if any, and DetachSubscriptionResponse |
Returns:
Type | Description |
---|---|
undefined |
detachSubscription(request) → {Promise.<google.pubsub.v1.DetachSubscriptionResponse>}
Calls DetachSubscription.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IDetachSubscriptionRequest |
DetachSubscriptionRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.pubsub.v1.DetachSubscriptionResponse> |
Promise |
getTopic(request, callback) → {undefined}
Calls GetTopic.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IGetTopicRequest |
GetTopicRequest message or plain object |
callback |
google.pubsub.v1.Publisher.GetTopicCallback |
Node-style callback called with the error, if any, and Topic |
Returns:
Type | Description |
---|---|
undefined |
getTopic(request) → {Promise.<google.pubsub.v1.Topic>}
Calls GetTopic.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IGetTopicRequest |
GetTopicRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.pubsub.v1.Topic> |
Promise |
listTopicSnapshots(request, callback) → {undefined}
Calls ListTopicSnapshots.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IListTopicSnapshotsRequest |
ListTopicSnapshotsRequest message or plain object |
callback |
google.pubsub.v1.Publisher.ListTopicSnapshotsCallback |
Node-style callback called with the error, if any, and ListTopicSnapshotsResponse |
Returns:
Type | Description |
---|---|
undefined |
listTopicSnapshots(request) → {Promise.<google.pubsub.v1.ListTopicSnapshotsResponse>}
Calls ListTopicSnapshots.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IListTopicSnapshotsRequest |
ListTopicSnapshotsRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.pubsub.v1.ListTopicSnapshotsResponse> |
Promise |
listTopicSubscriptions(request, callback) → {undefined}
Calls ListTopicSubscriptions.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IListTopicSubscriptionsRequest |
ListTopicSubscriptionsRequest message or plain object |
callback |
google.pubsub.v1.Publisher.ListTopicSubscriptionsCallback |
Node-style callback called with the error, if any, and ListTopicSubscriptionsResponse |
Returns:
Type | Description |
---|---|
undefined |
listTopicSubscriptions(request) → {Promise.<google.pubsub.v1.ListTopicSubscriptionsResponse>}
Calls ListTopicSubscriptions.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IListTopicSubscriptionsRequest |
ListTopicSubscriptionsRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.pubsub.v1.ListTopicSubscriptionsResponse> |
Promise |
listTopics(request, callback) → {undefined}
Calls ListTopics.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IListTopicsRequest |
ListTopicsRequest message or plain object |
callback |
google.pubsub.v1.Publisher.ListTopicsCallback |
Node-style callback called with the error, if any, and ListTopicsResponse |
Returns:
Type | Description |
---|---|
undefined |
listTopics(request) → {Promise.<google.pubsub.v1.ListTopicsResponse>}
Calls ListTopics.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IListTopicsRequest |
ListTopicsRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.pubsub.v1.ListTopicsResponse> |
Promise |
publish(request, callback) → {undefined}
Calls Publish.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IPublishRequest |
PublishRequest message or plain object |
callback |
google.pubsub.v1.Publisher.PublishCallback |
Node-style callback called with the error, if any, and PublishResponse |
Returns:
Type | Description |
---|---|
undefined |
publish(request) → {Promise.<google.pubsub.v1.PublishResponse>}
Calls Publish.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IPublishRequest |
PublishRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.pubsub.v1.PublishResponse> |
Promise |
updateTopic(request, callback) → {undefined}
Calls UpdateTopic.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IUpdateTopicRequest |
UpdateTopicRequest message or plain object |
callback |
google.pubsub.v1.Publisher.UpdateTopicCallback |
Node-style callback called with the error, if any, and Topic |
Returns:
Type | Description |
---|---|
undefined |
updateTopic(request) → {Promise.<google.pubsub.v1.Topic>}
Calls UpdateTopic.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.pubsub.v1.IUpdateTopicRequest |
UpdateTopicRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.pubsub.v1.Topic> |
Promise |
(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {Publisher}
Creates new Publisher service using the specified rpc implementation.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
rpcImpl |
$protobuf.RPCImpl |
RPC implementation |
||
requestDelimited |
boolean |
<optional> |
false |
Whether requests are length-delimited |
responseDelimited |
boolean |
<optional> |
false |
Whether responses are length-delimited |
Returns:
Type | Description |
---|---|
Publisher |
RPC service. Useful where requests and/or responses are streamed. |
Type Definitions
CreateTopicCallback(error, responseopt)
Callback as used by createTopic.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.pubsub.v1.Topic |
<optional> |
Topic |
DeleteTopicCallback(error, responseopt)
Callback as used by deleteTopic.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.protobuf.Empty |
<optional> |
Empty |
DetachSubscriptionCallback(error, responseopt)
Callback as used by detachSubscription.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.pubsub.v1.DetachSubscriptionResponse |
<optional> |
DetachSubscriptionResponse |
GetTopicCallback(error, responseopt)
Callback as used by getTopic.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.pubsub.v1.Topic |
<optional> |
Topic |
ListTopicSnapshotsCallback(error, responseopt)
Callback as used by listTopicSnapshots.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.pubsub.v1.ListTopicSnapshotsResponse |
<optional> |
ListTopicSnapshotsResponse |
ListTopicSubscriptionsCallback(error, responseopt)
Callback as used by listTopicSubscriptions.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.pubsub.v1.ListTopicSubscriptionsResponse |
<optional> |
ListTopicSubscriptionsResponse |
ListTopicsCallback(error, responseopt)
Callback as used by listTopics.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.pubsub.v1.ListTopicsResponse |
<optional> |
ListTopicsResponse |
PublishCallback(error, responseopt)
Callback as used by publish.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.pubsub.v1.PublishResponse |
<optional> |
PublishResponse |
UpdateTopicCallback(error, responseopt)
Callback as used by updateTopic.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.pubsub.v1.Topic |
<optional> |
Topic |