tmq

package
v3.0.0-...-42de6d8 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorOther = 0xffff
View Source
const OffsetInvalid = Offset(-2147467247)

Variables

This section is empty.

Functions

This section is empty.

Types

type Assignment

type Assignment struct {
	VGroupID int32 `json:"vgroup_id"`
	Offset   int64 `json:"offset"`
	Begin    int64 `json:"begin"`
	End      int64 `json:"end"`
}

type Column

type Column struct {
	Name   string `json:"name"`
	Type   int    `json:"type"`
	Length int    `json:"length"`
}

type ConfigMap

type ConfigMap map[string]ConfigValue

func (ConfigMap) Clone

func (m ConfigMap) Clone() ConfigMap

func (ConfigMap) Get

func (m ConfigMap) Get(key string, defval ConfigValue) (ConfigValue, error)

type ConfigValue

type ConfigValue interface{}

type CreateItem

type CreateItem struct {
	TableName string `json:"tableName"`
	Using     string `json:"using"`
	TagNum    int    `json:"tagNum"`
	Tags      []*Tag `json:"tags"`
}

type Data

type Data struct {
	TableName string
	Data      [][]driver.Value
}

type DataMessage

type DataMessage struct {
	TopicPartition TopicPartition
	// contains filtered or unexported fields
}

func (*DataMessage) DBName

func (m *DataMessage) DBName() string

func (*DataMessage) Offset

func (m *DataMessage) Offset() Offset

func (*DataMessage) SetData

func (m *DataMessage) SetData(data []*Data)

func (*DataMessage) SetDbName

func (m *DataMessage) SetDbName(dbName string)

func (*DataMessage) SetOffset

func (m *DataMessage) SetOffset(offset Offset)

func (*DataMessage) SetTopic

func (m *DataMessage) SetTopic(topic string)

func (*DataMessage) String

func (m *DataMessage) String() string

func (*DataMessage) Topic

func (m *DataMessage) Topic() string

func (*DataMessage) Value

func (m *DataMessage) Value() interface{}

type Error

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

func NewTMQError

func NewTMQError(code int, str string) Error

func NewTMQErrorWithErr

func NewTMQErrorWithErr(err error) Error

func (Error) Code

func (e Error) Code() int

func (Error) Error

func (e Error) Error() string

func (Error) String

func (e Error) String() string

type Event

type Event interface {
	String() string
}

type Message

type Message interface {
	Topic() string
	DBName() string
	Value() interface{}
	Offset() int64
}

type Meta

type Meta struct {
	Type          string        `json:"type"`
	TableName     string        `json:"tableName"`
	TableType     string        `json:"tableType"`
	CreateList    []*CreateItem `json:"createList"`
	Columns       []*Column     `json:"columns"`
	Using         string        `json:"using"`
	TagNum        int           `json:"tagNum"`
	Tags          []*Tag        `json:"tags"`
	TableNameList []string      `json:"tableNameList"`
	AlterType     int           `json:"alterType"`
	ColName       string        `json:"colName"`
	ColNewName    string        `json:"colNewName"`
	ColType       int           `json:"colType"`
	ColLength     int           `json:"colLength"`
	ColValue      string        `json:"colValue"`
	ColValueNull  bool          `json:"colValueNull"`
}

type MetaData

type MetaData struct {
	Meta *Meta
	Data []*Data
}

type MetaDataMessage

type MetaDataMessage struct {
	TopicPartition TopicPartition
	// contains filtered or unexported fields
}

func (*MetaDataMessage) DBName

func (m *MetaDataMessage) DBName() string

func (*MetaDataMessage) Offset

func (m *MetaDataMessage) Offset() Offset

func (*MetaDataMessage) SetDbName

func (m *MetaDataMessage) SetDbName(dbName string)

func (*MetaDataMessage) SetMetaData

func (m *MetaDataMessage) SetMetaData(metaData *MetaData)

func (*MetaDataMessage) SetOffset

func (m *MetaDataMessage) SetOffset(offset Offset)

func (*MetaDataMessage) SetTopic

func (m *MetaDataMessage) SetTopic(topic string)

func (*MetaDataMessage) String

func (m *MetaDataMessage) String() string

func (*MetaDataMessage) Topic

func (m *MetaDataMessage) Topic() string

func (*MetaDataMessage) Value

func (m *MetaDataMessage) Value() interface{}

type MetaMessage

type MetaMessage struct {
	TopicPartition TopicPartition
	// contains filtered or unexported fields
}

func (*MetaMessage) DBName

func (m *MetaMessage) DBName() string

func (*MetaMessage) Offset

func (m *MetaMessage) Offset() Offset

func (*MetaMessage) SetDbName

func (m *MetaMessage) SetDbName(dbName string)

func (*MetaMessage) SetMeta

func (m *MetaMessage) SetMeta(meta *Meta)

func (*MetaMessage) SetOffset

func (m *MetaMessage) SetOffset(offset Offset)

func (*MetaMessage) SetTopic

func (m *MetaMessage) SetTopic(topic string)

func (*MetaMessage) String

func (m *MetaMessage) String() string

func (*MetaMessage) Topic

func (m *MetaMessage) Topic() string

func (*MetaMessage) Value

func (m *MetaMessage) Value() interface{}

type Offset

type Offset int64

func (Offset) String

func (o Offset) String() string

func (Offset) Valid

func (o Offset) Valid() bool

type Tag

type Tag struct {
	Name  string      `json:"name"`
	Type  int         `json:"type"`
	Value interface{} `json:"value"`
}

type TopicPartition

type TopicPartition struct {
	Topic     *string
	Partition int32
	Offset    Offset
	Metadata  *string
	Error     error
}

func (TopicPartition) String

func (p TopicPartition) String() string

Jump to

Keyboard shortcuts

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