Class Channel (6.11.0)

Create a channel object to interact with a Cloud Storage channel.

See Object Change Notification

Inheritance

ServiceObject > Channel

Package

@google-cloud/storage

Example

  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

Parameters
Name
Description
storage
id
string
resourceId
string

Methods

stop()

  stop 
 () 
 : 
  
 Promise<Metadata> 
 ; 
 
Returns
Type
Description
Promise < Metadata >

stop(callback)

  stop 
 ( 
 callback 
 : 
  
 StopCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name
Description
callback
Returns
Type
Description
void
Design a Mobile Site
View Site in Mobile | Classic
Share by: