diff --git a/sonic/driver.go b/sonic/driver.go index 2326bf2..a573fc8 100644 --- a/sonic/driver.go +++ b/sonic/driver.go @@ -5,7 +5,12 @@ import ( ) var ( - ErrClosed = errors.New("sonic connection is closed") + // ErrClosed is throw when an error with the sonic server + // come from the state of the connection. + ErrClosed = errors.New("sonic connection is closed") + + // ErrChanName is throw when the channel name is not supported + // by sonic server. ErrChanName = errors.New("invalid channel name") ) diff --git a/sonic/ingester.go b/sonic/ingester.go index 85db485..27b322b 100644 --- a/sonic/ingester.go +++ b/sonic/ingester.go @@ -7,10 +7,12 @@ import ( "sync" ) +// IngestBulkRecord is the struct to be used as a list in bulk operation. type IngestBulkRecord struct { Object, Text string } +// IngestBulkError represent an error for a given object in a bulk operation. type IngestBulkError struct { Object string Error error diff --git a/sonic/search.go b/sonic/search.go index 89ca02f..ff22c13 100644 --- a/sonic/search.go +++ b/sonic/search.go @@ -35,7 +35,7 @@ type searchChannel struct { *driver } -// NewIngester create a new driver instance with a searchChannel instance. +// NewSearch create a new driver instance with a searchChannel instance. // Only way to get a Searchable implementation. func NewSearch(host string, port int, password string) (Searchable, error) { driver := &driver{