void Producer::Init()

in src/Producer.cc [29:42]


void Producer::Init(Napi::Env env, Napi::Object exports) {
  Napi::HandleScope scope(env);

  Napi::Function func =
      DefineClass(env, "Producer",
                  {InstanceMethod("send", &Producer::Send), InstanceMethod("flush", &Producer::Flush),
                   InstanceMethod("close", &Producer::Close),
                   InstanceMethod("getProducerName", &Producer::GetProducerName),
                   InstanceMethod("getTopic", &Producer::GetTopic),
                   InstanceMethod("isConnected", &Producer::IsConnected)});

  constructor = Napi::Persistent(func);
  constructor.SuppressDestruct();
}