Documentation ¶
Index ¶
- Constants
- Variables
- func Flatten(source map[string]interface{}) ([]map[string]interface{}, error)
- type BaseResponse
- type Config
- type CopyRequest
- type CopyResponse
- type DatasetResource
- type KillTaskRequest
- type KillTaskResponse
- type Server
- type Service
- type Task
- type TaskInfo
- type TaskListRequest
- type TaskListResponse
- type Transformer
Constants ¶
View Source
const ( //StatusTaskNotRunning represent terminated task StatusTaskNotRunning = iota //StatusTaskRunning represents active copy task StatusTaskRunning )
Variables ¶
View Source
var Transformers = make(map[string]Transformer)
Transformers represents transformer registry
Functions ¶
Types ¶
type BaseResponse ¶
BaseResponse represents a base response
type CopyRequest ¶
type CopyRequest struct { BatchSize int InsertMode bool Source *DatasetResource Destination *DatasetResource Transformer string }
CopyRequest represents a copy request
type CopyResponse ¶
type CopyResponse struct { *BaseResponse *TaskInfo }
CopyResponse represents a copy response
type DatasetResource ¶
type DatasetResource struct { DsConfig *dsc.Config Table string PkColumns []string Columns []string SQL string }
DatasetResource represents a datastore resource
func (*DatasetResource) AsTableDescription ¶
func (r *DatasetResource) AsTableDescription() *dsc.TableDescriptor
AsTableDescription converts data resource as table descriptor
type KillTaskRequest ¶
type KillTaskRequest struct {
ID string
}
KillTaskRequest represents kill task
type KillTaskResponse ¶
type KillTaskResponse struct { *BaseResponse Task *Task }
KillTaskResponse represents kill task response
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents http server
type Service ¶
type Service interface { Copy(request *CopyRequest) *CopyResponse TaskList(request *TaskListRequest) *TaskListResponse KillTask(request *KillTaskRequest) *KillTaskResponse }
Service represents transformer service
type Task ¶
type Task struct { ID string Status string StatusCode int32 Table string Request interface{} *BaseResponse *TaskInfo }
Task represents a task
type TaskInfo ¶
type TaskInfo struct { StatusCode int32 SkippedRecordCount int EmptyRecordCount int RecordCount int }
TaskInfo represents processed record info
type TaskListRequest ¶
type TaskListRequest struct {
Table string
}
TaskListRequest represents a task list request
type TaskListResponse ¶
TaskListResponse represents task list response
type Transformer ¶
Transformer represents transformer function
Source Files ¶
Click to show internal directories.
Click to hide internal directories.