destination

package
v0.0.0-...-2b644c5 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToBytes

func ConvertToBytes(v interface{}) []byte

Types

type DbRow

type DbRow struct {
	Schema string                 `json:"schema"`
	Table  string                 `json:"table"`
	Data   map[string]interface{} `json:"data"`
}

type ElasticSearch

type ElasticSearch struct {
	URLs                []string       `yaml:"urls"`
	IndexName           string         `yaml:"indexName"`
	Username            string         `yaml:"username"`
	Password            string         `yaml:"password"`
	EnableSniffer       bool           `yaml:"enableSniffer"`
	Timeout             model.Duration `yaml:"timeout"`
	HealthCheckInterval model.Duration `yaml:"healthCheckInterval"`

	Client *elastic.Client `yaml:"-"`
}

func (*ElasticSearch) Close

func (d *ElasticSearch) Close() error

func (*ElasticSearch) Start

func (d *ElasticSearch) Start(_ context.Context, _ *http.ServeMux) error

func (*ElasticSearch) Write

func (d *ElasticSearch) Write(ctx context.Context, v interface{}) error

type File

type File struct {
	Prefix string `yaml:"prefix"`
}

func (*File) Write

func (t *File) Write(ctx context.Context, v interface{}) error

type Kafka

type Kafka struct {
	Version     string   `yaml:"version"`
	Brokers     []string `yaml:"brokers"`
	TopicPrefix string   `yaml:"topicPrefix"`
	// contains filtered or unexported fields
}

func (*Kafka) Start

func (d *Kafka) Start(_ context.Context, _ *http.ServeMux) error

func (*Kafka) Write

func (d *Kafka) Write(_ context.Context, v interface{}) error

type Mysql

type Mysql struct {
	DSN           string            `yaml:"dsn"`
	SyncMarkTable string            `yaml:"syncMarkTable"`
	SyncChannel   string            `yaml:"syncChannel"`
	SyncTables    map[string]string `yaml:"syncTables"`
	// contains filtered or unexported fields
}

func (*Mysql) Close

func (t *Mysql) Close() error

func (*Mysql) Start

func (t *Mysql) Start(_ context.Context, _ *http.ServeMux) error

func (*Mysql) Write

func (t *Mysql) Write(ctx context.Context, v interface{}) error

type Noop

type Noop struct {
}

func (*Noop) Write

func (t *Noop) Write(ctx context.Context, v interface{}) error

type SyncRow

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

type TableMeta

type TableMeta struct {
	Table      string `yaml:"table"`
	FieldAsCid string `yaml:"fieldAsCid"`
	Prefix     string `yaml:"prefix"`
}

type Weed

type Weed struct {
	Masters      []string    `yaml:"masters"`
	FidStorePath string      `yaml:"fidStorePath"` // 默认值./fid_store
	Tables       []string    `yaml:"tables"`
	FiledAsCids  []TableMeta `yaml:"filedAsCids"`
	// contains filtered or unexported fields
}

func (*Weed) Close

func (t *Weed) Close() (err error)

func (*Weed) Start

func (t *Weed) Start(ctx context.Context, handler *http.ServeMux) (err error)

func (*Weed) Write

func (t *Weed) Write(_ context.Context, v interface{}) error

Jump to

Keyboard shortcuts

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