Create a channel object to interact with a Cloud Storage channel.
Inheritance
ServiceObject > ChannelPackage
@google-cloud/storageExample
const
{
Storage
}
=
require
(
' @google-cloud/storage
'
);
const
storage
=
new
Storage
();
const
channel
=
storage
.
channel
(
'id'
,
'resource-id'
);
Constructors
(constructor)(storage, id, resourceId)
constructor
(
storage
:
Storage
,
id
:
string
,
resourceId
:
string
);
Constructs a new instance of the Channel
class
Methods
stop()
stop
()
:
Promise<Metadata>
;
Returns
Type
Description
Promise
< Metadata
>
stop(callback)
stop
(
callback
:
StopCallback
)
:
void
;
Returns
Type
Description
void