add bulk with go routines

This commit is contained in:
alexisvisco 2019-03-27 15:22:27 +01:00
parent 56a7e26248
commit 52d3ad065b
9 changed files with 324 additions and 127 deletions

View file

@ -1,13 +1,20 @@
package sonic
// Channel refer to the list of channels available.
type Channel string
const (
Search Channel = "search"
Ingest Channel = "ingest"
// Search is used for querying the search index.
Search Channel = "search"
// Ingest is used for altering the search index (push, pop and flush).
Ingest Channel = "ingest"
// Control is used for administration purposes.
Control Channel = "control"
)
// IsChannelValid check if the parameter is a valid channel.
func IsChannelValid(ch Channel) bool {
return ch == Search || ch == Ingest || ch == Control
}