Documentation ¶
Overview ¶
Package dataservices provides a way to call Data Services
Index ¶
- type BulkDataService
- func (bds *BulkDataService) BatchSize() uint16
- func (bds *BulkDataService) Cancel() *BulkDataService
- func (bds *BulkDataService) Run() *BulkDataService
- func (bds *BulkDataService) ThreadCount() uint8
- func (bds *BulkDataService) Wait() *BulkDataService
- func (bds *BulkDataService) WithBatchSize(batchSize uint16) *BulkDataService
- func (bds *BulkDataService) WithEndpointState(endpointState []byte) *BulkDataService
- func (bds *BulkDataService) WithForestBasedWorkUnits() *BulkDataService
- func (bds *BulkDataService) WithInputChannel(inputChannel <-chan *handle.Handle) *BulkDataService
- func (bds *BulkDataService) WithOutputListener(listener chan []byte) *BulkDataService
- func (bds *BulkDataService) WithThreadCount(threadCount uint8) *BulkDataService
- func (bds *BulkDataService) WithWorkUnits(workUnits ...interface{}) *BulkDataService
- type DataServiceBatch
- type Service
- type WorkPhase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkDataService ¶
type BulkDataService struct {
// contains filtered or unexported fields
}
BulkDataService reads documents in bulk
func (*BulkDataService) BatchSize ¶
func (bds *BulkDataService) BatchSize() uint16
BatchSize is the number documents we'll create in a single batch
func (*BulkDataService) Cancel ¶
func (bds *BulkDataService) Cancel() *BulkDataService
Cancel interupts the service
func (*BulkDataService) Run ¶
func (bds *BulkDataService) Run() *BulkDataService
Run the BulkDataService
func (*BulkDataService) ThreadCount ¶
func (bds *BulkDataService) ThreadCount() uint8
ThreadCount is the number threads we'll create
func (*BulkDataService) Wait ¶
func (bds *BulkDataService) Wait() *BulkDataService
Wait on the BulkDataService to finish
func (*BulkDataService) WithBatchSize ¶
func (bds *BulkDataService) WithBatchSize(batchSize uint16) *BulkDataService
WithBatchSize sets the number documents we'll create in a single batch
func (*BulkDataService) WithEndpointState ¶
func (bds *BulkDataService) WithEndpointState(endpointState []byte) *BulkDataService
WithEndpointState sets an intial Endpoint State for the Data Service
func (*BulkDataService) WithForestBasedWorkUnits ¶
func (bds *BulkDataService) WithForestBasedWorkUnits() *BulkDataService
WithForestBasedWorkUnits sets work units based off of forests in the database
func (*BulkDataService) WithInputChannel ¶
func (bds *BulkDataService) WithInputChannel(inputChannel <-chan *handle.Handle) *BulkDataService
WithInputChannel adds a channel to feed input to BulkDataServices
func (*BulkDataService) WithOutputListener ¶
func (bds *BulkDataService) WithOutputListener(listener chan []byte) *BulkDataService
WithOutputListener adds a listener to the output from BulkDataServices
func (*BulkDataService) WithThreadCount ¶
func (bds *BulkDataService) WithThreadCount(threadCount uint8) *BulkDataService
WithThreadCount set the thread count
func (*BulkDataService) WithWorkUnits ¶
func (bds *BulkDataService) WithWorkUnits(workUnits ...interface{}) *BulkDataService
WithWorkUnits sets up work units to send to BulkDataServices
type DataServiceBatch ¶
type DataServiceBatch struct {
// contains filtered or unexported fields
}
DataServiceBatch submits documents in bulk
func (*DataServiceBatch) Input ¶
func (dsb *DataServiceBatch) Input() []*handle.Handle
Input contains the data to send to the Data Service
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is used for the datamservices service
func NewService ¶
NewService returns a new dataservices.Service
func (*Service) BulkDataService ¶
func (s *Service) BulkDataService(endpoint string) *BulkDataService
BulkDataService for bulk data service operations
type WorkPhase ¶
type WorkPhase int
WorkPhase describes the state of the Bulk Data Service
const ( // INITIALIZING BulkDataService has not run called the Data Service endpoint yet INITIALIZING WorkPhase = iota // RUNNING BulkDataService is calling the Data Service endpoint RUNNING // INTERRUPTING request to interupt the BulkDataService has been made INTERRUPTING // INTERRUPTED BulkDataService has been interupted INTERRUPTED // COMPLETED BulkDataService has finished COMPLETED )