Просмотр исходного кода

docs: document typical usage of a session object

Christoph Hack 12 лет назад
Родитель
Сommit
9be9717d49
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      session.go

+ 6 - 2
session.go

@@ -14,8 +14,12 @@ import (
 
 // Session is the interface used by users to interact with the database.
 //
-// It extends the Node interface by adding a convinient query builder and
-// automatically sets a default consinstency level on all operations
+// It's safe for concurrent use by multiple goroutines and a typical usage
+// scenario is to have one global session object to interact with the
+// whole Cassandra cluster.
+//
+// This type extends the Node interface by adding a convinient query builder
+// and automatically sets a default consinstency level on all operations
 // that do not have a consistency level set.
 type Session struct {
 	Node     Node