dataservices

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package dataservices provides a way to call Data Services

Index

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

func NewService(client *clients.Client) *Service

NewService returns a new dataservices.Service

func (*Service) BulkDataService

func (s *Service) BulkDataService(endpoint string) *BulkDataService

BulkDataService for bulk data service operations

func (*Service) CallDataService

func (s *Service) CallDataService(endpoint string, atomicParams map[string][]string, unatomicParams map[string][]*handle.Handle, responseHandle handle.ResponseHandle) error

CallDataService 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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL