code: func (e *endpointImpl) run() {
  	stream, err := e.client.ListAndWatch(context.Background(), &pluginapi.Empty{})
  	if err != nil {
  		klog.Errorf(errListAndWatch, e.resourceName, err)
  
  		return
  	}
  
  	for {
  		response, err := stream.Recv()
  		if err != nil {
  			klog.Errorf(errListAndWatch, e.resourceName, err)
  			return
  		}
  
  		devs := response.Devices
  		klog.V(2).Infof("State pushed for device plugin %s", e.resourceName)
  
  		var newDevs []pluginapi.Device
  		for _, d := range devs {
  			newDevs = append(newDevs, *d)
  		}
  
  		e.callback(e.resourceName, newDevs)
  	}
  }
docs: // run initializes ListAndWatch gRPC call for the device plugin and
  // blocks on receiving ListAndWatch gRPC stream updates. Each ListAndWatch
  // stream update contains a new list of device states.
  // It then issues a callback to pass this information to the device manager which
  // will adjust the resource available information accordingly.