routers

package
v0.9.71 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EsModelOneOneObject = int64(1)
	EsModelOneOneExtend = int64(2)

	EsModelTypeMappingObject = "object"
	EsModelTypeMappingNested = "nested"

	EsModelVersion7 = "7"
	EsModelVersion6 = "6"

	EsModelRelationMain    = 1
	EsModelRelationOneOne  = 2
	EsModelRelationOneMany = 3
)

Variables

This section is empty.

Functions

func FromJson added in v0.9.66

func FromJson(jsonStr string, obj interface{}) error

func ToJson added in v0.9.66

func ToJson(obj interface{}) (string, error)

Types

type ElasticsearchRoute added in v0.9.35

type ElasticsearchRoute struct {
	RouteMatchers
	TargetIndex        string
	TargetType         string
	IgnoreNoPrimaryKey bool
}

func NewElasticsearchRoutes added in v0.9.35

func NewElasticsearchRoutes(configData []map[string]interface{}) ([]*ElasticsearchRoute, error)

type ElasticsearchRouter added in v0.9.35

type ElasticsearchRouter []*ElasticsearchRoute

func (ElasticsearchRouter) Exists added in v0.9.35

func (r ElasticsearchRouter) Exists(msg *core.Msg) bool

func (ElasticsearchRouter) Match added in v0.9.35

type EsModelBaseRoute added in v0.9.66

type EsModelBaseRoute struct {
	RouteMatchers
	DataBase      string
	Table         string
	PkColumn      string
	ConvertColumn *map[string]string
	ExcludeColumn *map[string]string
	IncludeColumn *map[string]string

	RouteType int
}

func NewEsModelBaseRoute added in v0.9.66

func NewEsModelBaseRoute(routeConfig map[string]interface{}, baseRoute *EsModelBaseRoute) (*EsModelBaseRoute, error)

type EsModelOneManyRoute added in v0.9.66

type EsModelOneManyRoute struct {
	EsModelBaseRoute
	FkColumn     string
	PropertyName string
}

func NewEsModelOneManyRoute added in v0.9.66

func NewEsModelOneManyRoute(routeConfig map[string]interface{}, manyRoute *EsModelOneManyRoute) (*EsModelOneManyRoute, error)

func NewEsModelOneManyRoutes added in v0.9.66

func NewEsModelOneManyRoutes(routeConfig map[string]interface{}) ([]*EsModelOneManyRoute, error)

type EsModelOneOneRoute added in v0.9.66

type EsModelOneOneRoute struct {
	EsModelOneManyRoute
	Mode        int64
	PropertyPre string
}

func NewEsModelOneOneRoutes added in v0.9.66

func NewEsModelOneOneRoutes(routeConfig map[string]interface{}) ([]*EsModelOneOneRoute, error)

type EsModelRoute added in v0.9.66

type EsModelRoute struct {
	EsModelBaseRoute

	IndexName          string
	TypeName           string
	ShardsNum          int64
	ReplicasNum        int64
	EsVer              string
	IgnoreNoPrimaryKey bool
	OneOne             *[]*EsModelOneOneRoute
	OneMany            *[]*EsModelOneManyRoute
}

func NewEsModelRoutes added in v0.9.66

func NewEsModelRoutes(configData []map[string]interface{}) ([]*EsModelRoute, error)

type EsModelRouter added in v0.9.66

type EsModelRouter []*EsModelRoute

func (EsModelRouter) Exists added in v0.9.66

func (r EsModelRouter) Exists(msg *core.Msg) bool

func (EsModelRouter) Match added in v0.9.66

func (r EsModelRouter) Match(msg *core.Msg) (*[]*EsModelRoute, bool)

type KafkaRoute

type KafkaRoute struct {
	RouteMatchers
	DMLTargetTopic string
}

func NewKafkaRoutes

func NewKafkaRoutes(configData []map[string]interface{}) ([]*KafkaRoute, error)

type KafkaRouter added in v0.9.17

type KafkaRouter []*KafkaRoute

func (KafkaRouter) Exists added in v0.9.17

func (r KafkaRouter) Exists(msg *core.Msg) bool

type MySQLRoute

type MySQLRoute struct {
	RouteMatchers
	TargetSchema string
	TargetTable  string
}

func NewMySQLRoutes

func NewMySQLRoutes(configData []map[string]interface{}) ([]*MySQLRoute, error)

func (*MySQLRoute) GetTarget

func (route *MySQLRoute) GetTarget(msgSchema string, msgTable string) (string, string)

type MySQLRouter added in v0.9.17

type MySQLRouter []*MySQLRoute

func (MySQLRouter) Exists added in v0.9.17

func (r MySQLRouter) Exists(msg *core.Msg) bool

type RouteMatchers

type RouteMatchers struct {
	AllMatchers []core.IMatcher
}

func (RouteMatchers) Match

func (r RouteMatchers) Match(msg *core.Msg) bool

Jump to

Keyboard shortcuts

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