writer

package
v0.0.0-...-9780f3b Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataType_name = map[int32]string{
	0: "boolean",
	1: "binary",
	2: "string",
	3: "uint64",
	4: "int64",
	5: "float64",
	6: "array",
	7: "map",
}

Functions

This section is empty.

Types

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

func NewConnector

func NewConnector(hosts []string) *Connector

func (*Connector) Connect

func (connector *Connector) Connect() error

type DBCommand

type DBCommand struct {
	PipelineID uint64
	Sequence   uint64
	Reference  interface{}
	Record     *gravity_sdk_types_record.Record
	QueryStr   string
	Args       map[string]interface{}
	Tables     []string
}

func (*DBCommand) GetPipelineID

func (cmd *DBCommand) GetPipelineID() uint64

func (*DBCommand) GetReference

func (cmd *DBCommand) GetReference() interface{}

func (*DBCommand) GetSequence

func (cmd *DBCommand) GetSequence() uint64

func (*DBCommand) GetTables

func (cmd *DBCommand) GetTables() []string

type Field

type Field struct {
	Type  string      `json:"type"`
	Field interface{} `json:"field"`
}

type JsonData

type JsonData struct {
	Schema   Schema                 `json:"schema"`
	Playload map[string]interface{} `json:"playload"`
}

type Schema

type Schema struct {
	Method string  `json:"method"`
	Event  string  `json:"event"`
	Table  string  `json:"table"`
	Type   string  `json:"type"`
	Fields []Field `json:"fields"`
}

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter() *Writer

func (*Writer) Init

func (writer *Writer) Init() error

func (*Writer) ProcessData

func (writer *Writer) ProcessData(reference interface{}, record *gravity_sdk_types_record.Record, tables []string) error

func (*Writer) Publish

func (writer *Writer) Publish(reference interface{}, record *gravity_sdk_types_record.Record, message string, topic string, tables []string)

func (*Writer) SetCompletionHandler

func (writer *Writer) SetCompletionHandler(fn database.CompletionHandler)

func (*Writer) Truncate

func (writer *Writer) Truncate(table string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳