Publisher

google.pubsub.v1. Publisher

Represents a Publisher

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

(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

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

createTopic(request) → {Promise.<google.pubsub.v1.Topic>}

Calls CreateTopic.

Parameters:
Name Type Description
request google.pubsub.v1.ITopic

Topic message or plain object

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

deleteTopic(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteTopic.

Parameters:
Name Type Description
request google.pubsub.v1.IDeleteTopicRequest

DeleteTopicRequest message or plain object

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

detachSubscription(request) → {Promise.<google.pubsub.v1.DetachSubscriptionResponse>}

Calls DetachSubscription.

Parameters:
Name Type Description
request google.pubsub.v1.IDetachSubscriptionRequest

DetachSubscriptionRequest message or plain object

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

getTopic(request) → {Promise.<google.pubsub.v1.Topic>}

Calls GetTopic.

Parameters:
Name Type Description
request google.pubsub.v1.IGetTopicRequest

GetTopicRequest message or plain object

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

listTopics(request) → {Promise.<google.pubsub.v1.ListTopicsResponse>}

Calls ListTopics.

Parameters:
Name Type Description
request google.pubsub.v1.IListTopicsRequest

ListTopicsRequest message or plain object

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

listTopicSnapshots(request) → {Promise.<google.pubsub.v1.ListTopicSnapshotsResponse>}

Calls ListTopicSnapshots.

Parameters:
Name Type Description
request google.pubsub.v1.IListTopicSnapshotsRequest

ListTopicSnapshotsRequest message or plain object

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

listTopicSubscriptions(request) → {Promise.<google.pubsub.v1.ListTopicSubscriptionsResponse>}

Calls ListTopicSubscriptions.

Parameters:
Name Type Description
request google.pubsub.v1.IListTopicSubscriptionsRequest

ListTopicSubscriptionsRequest message or plain object

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

publish(request) → {Promise.<google.pubsub.v1.PublishResponse>}

Calls Publish.

Parameters:
Name Type Description
request google.pubsub.v1.IPublishRequest

PublishRequest message or plain object

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

updateTopic(request) → {Promise.<google.pubsub.v1.Topic>}

Calls UpdateTopic.

Parameters:
Name Type Description
request google.pubsub.v1.IUpdateTopicRequest

UpdateTopicRequest message or plain object

Type Definitions

CreateTopicCallback(error, responseopt)

Callback as used by google.pubsub.v1.Publisher#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 google.pubsub.v1.Publisher#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 google.pubsub.v1.Publisher#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 google.pubsub.v1.Publisher#getTopic.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.Topic <optional>

Topic

ListTopicsCallback(error, responseopt)

Callback as used by google.pubsub.v1.Publisher#listTopics.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.ListTopicsResponse <optional>

ListTopicsResponse

ListTopicSnapshotsCallback(error, responseopt)

Callback as used by google.pubsub.v1.Publisher#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 google.pubsub.v1.Publisher#listTopicSubscriptions.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.ListTopicSubscriptionsResponse <optional>

ListTopicSubscriptionsResponse

PublishCallback(error, responseopt)

Callback as used by google.pubsub.v1.Publisher#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 google.pubsub.v1.Publisher#updateTopic.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.Topic <optional>

Topic