Disconnect

Closes the current connection to Kuzzle. The SDK is now in offline state. A call to disconnect() will not trigger a disconnected event. This event is only triggered on unexpected disconnection.

Arguments

Copied to clipboard!
Disconnect() error

Return

Return a Kuzzle error if the connection can't be closed.

Usage

Copied to clipboard!
err := kuzzle.Disconnect()

if err != nil {
  log.Fatal(err)
} else {
  fmt.Println("Success")
}