model

package
v0.0.0-...-736094d Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PipelineInfoNormal  = 1
	PipelineInfoDisable = 2
)
View Source
const (
	TargetTypeMongodb       = 1
	TargetTypeElasticsearch = 2
	TargetTypeRedis         = 3
	TargetTypeRocketmq      = 4
	TargetTypeKafka         = 5
	TargetTypeRabbitmq      = 6
	TargetTypeScript        = 7
)

Variables

View Source
var RowRequestPool = sync.Pool{
	New: func() interface{} {
		return new(RowRequest)
	},
}

Functions

func ReleaseESRespond

func ReleaseESRespond(t *ESRespond)

func ReleaseMQRespond

func ReleaseMQRespond(t *MQRespond)

func ReleaseMongoRespond

func ReleaseMongoRespond(t *MongoRespond)

func ReleaseRedisRespond

func ReleaseRedisRespond(t *RedisRespond)

func ReleaseRowRequest

func ReleaseRowRequest(t *RowRequest)

Types

type ESRespond

type ESRespond struct {
	Index  string
	Id     string
	Action string
	Date   string
}

func BuildESRespond

func BuildESRespond() *ESRespond

type MQRespond

type MQRespond struct {
	Topic     string      `json:"-"`
	Action    string      `json:"action"`
	Timestamp uint32      `json:"timestamp"`
	Raw       interface{} `json:"raw,omitempty"`
	Date      interface{} `json:"date"`
	ByteArray []byte      `json:"-"`
}

func BuildMQRespond

func BuildMQRespond() *MQRespond

type MongoRespond

type MongoRespond struct {
	RuleKey    string
	Collection string
	Action     string
	Id         interface{}
	Table      map[string]interface{}
}

func BuildMongoRespond

func BuildMongoRespond() *MongoRespond

type Padding

type Padding struct {
	WrapName string

	ColumnName     string
	ColumnIndex    int
	ColumnType     int
	ColumnMetadata *schema.TableColumn
}

type PipelineInfo

type PipelineInfo struct {
	Id         uint64
	Name       string
	SourceId   uint64
	TargetId   uint64
	Status     uint8
	CreateTime int64
	UpdateTime int64
}

PipelineInfo 管道

type PosRequest

type PosRequest struct {
	Name  string
	Pos   uint32
	Force bool
}

type RedisRespond

type RedisRespond struct {
	Action    string
	Structure string
	Key       string
	Field     string
	Score     float64
	OldVal    interface{}
	Val       interface{}
	Exts      map[string]interface{} // 扩展字段,备用
}

func BuildRedisRespond

func BuildRedisRespond() *RedisRespond

type Replog

type Replog struct {
	Id       uint64
	Type     uint8
	Target   uint8
	TargetId uint8

	Context []byte
	// contains filtered or unexported fields
}

Replog = Replicated Log

type RowRequest

type RowRequest struct {
	RuleKey   string
	Action    string
	Timestamp uint32
	Old       []interface{}
	Row       []interface{}
}

func BuildRowRequest

func BuildRowRequest() *RowRequest

type TargetInfo

type TargetInfo struct {
	Id       uint64
	Type     uint8
	Name     string
	Addr     string //地址
	Username string //用户名
	Password string //密码

	GroupType  string `yaml:"group_type"`  //集群类型 sentinel或者cluster
	MasterName string `yaml:"master_name"` //Master节点名称
	Database   int    `yaml:"database"`    //数据库

	Version int //版本

	NameServers  string //命名服务地址,多个用逗号分隔
	GroupName    string //group name,默认为空
	InstanceName string //instance name,默认为空
	AccessKey    string //访问控制 accessKey,默认为空
	SecretKey    string //访问控制 secretKey,默认为空

	SASLUser     string `yaml:"sasl_user"`     //SASL_PLAINTEXT认证模式 用户名
	SASLPassword string `yaml:"sasl_password"` //SASL_PLAINTEXT认证模式 密码

}

TargetInfo 目标

Jump to

Keyboard shortcuts

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