This commit is contained in:
alexisvisco 2019-03-27 15:46:45 +01:00
parent 3061d33062
commit 306a0979b2
3 changed files with 9 additions and 2 deletions

View file

@ -5,7 +5,12 @@ import (
) )
var ( var (
// ErrClosed is throw when an error with the sonic server
// come from the state of the connection.
ErrClosed = errors.New("sonic connection is closed") 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") ErrChanName = errors.New("invalid channel name")
) )

View file

@ -7,10 +7,12 @@ import (
"sync" "sync"
) )
// IngestBulkRecord is the struct to be used as a list in bulk operation.
type IngestBulkRecord struct { type IngestBulkRecord struct {
Object, Text string Object, Text string
} }
// IngestBulkError represent an error for a given object in a bulk operation.
type IngestBulkError struct { type IngestBulkError struct {
Object string Object string
Error error Error error

View file

@ -35,7 +35,7 @@ type searchChannel struct {
*driver *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. // Only way to get a Searchable implementation.
func NewSearch(host string, port int, password string) (Searchable, error) { func NewSearch(host string, port int, password string) (Searchable, error) {
driver := &driver{ driver := &driver{