Documentation ¶
Index ¶
- Constants
- type Channel
- type Channels
- type ChannelsMeta
- type Config
- type Consumer
- type Daemon
- type KILLYD
- func (v *KILLYD) DeleteExistingTopic(topicName string) error
- func (v *KILLYD) Exit()
- func (v *KILLYD) GetExistingTopic(topicName string) (*Topic, error)
- func (v *KILLYD) GetTopic(topicName string) *Topic
- func (v *KILLYD) Loadmeta(meta Meta) error
- func (v *KILLYD) Main()
- func (v *KILLYD) ToMinecraft()
- type Logger
- type Meta
- type Options
- type TCPMessage
- type Table
- type TidbEvent
- type Topic
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
func NewChannel ¶
func NewChannel(topicName string, channelName string, channelsMeta ChannelsMeta, ctx *context) *Channel
func (*Channel) StartChannel ¶
func (c *Channel) StartChannel()
func (*Channel) StartTikvChannel ¶
func (c *Channel) StartTikvChannel()
type Channels ¶
type Channels map[string]ChannelsMeta
type ChannelsMeta ¶
type Consumer ¶
type Consumer interface { UnPause() Pause() Close() error TimedOutMessage() Empty() }
type Daemon ¶
type Daemon struct { SendData TidbEvent Config *Config ExitChan chan int sync.Mutex // contains filtered or unexported fields }
func (*Daemon) ConversionMinecraft ¶
func (d *Daemon) ConversionMinecraft(data collectors.CollectData)
func (*Daemon) StartMonitoringEvents ¶
func (d *Daemon) StartMonitoringEvents()
type KILLYD ¶
func (*KILLYD) DeleteExistingTopic ¶
DeleteExistingTopic removes a topic only if it exists
func (*KILLYD) GetExistingTopic ¶
GetExistingTopic gets a topic only if it exists
func (*KILLYD) GetTopic ¶
GetTopic performs a thread safe operation to return a pointer to a Topic object (potentially new)
func (*KILLYD) ToMinecraft ¶
func (v *KILLYD) ToMinecraft()
type Options ¶
type Options struct { LogLevel string `flag:"log-level"` LogPrefix string `flag:"log-prefix"` Verbose bool `flag:"verbose"` Logger Logger Timeout int WorkSize int SendWorkSize int // contains filtered or unexported fields }
func NewOptions ¶
func NewOptions() *Options
type TCPMessage ¶
type TCPMessage struct { Cmd string `json:"cmd,omitempty"` Args []string `json:"args,omitempty"` // Id is used to associate requests & responses ID int `json:"id,omitempty"` Data interface{} `json:"data,omitempty"` }
TCPMessage defines what a message that can be sent or received to/from LUA scripts
type Table ¶
type Table struct { Name string `json:"name"` Columns []string `json:"columns"` Data [][]string `json:"data"` }
Table represents a table in TiDB
type TidbEvent ¶
type TidbEvent struct { TidbConnections string TidbAvailHosts []string TikvAvailHosts []string PdAvailHosts []string TidbNum string TikvNum string PdNum string Totalcap string Totalavail string EveryTikvStatus interface{} sync.RWMutex }
TidbEvent is one kind of Data that can be transported by a TCPMessage in the Data field.
type Topic ¶
Topic structure
func (*Topic) GetChannel ¶
func (t *Topic) GetChannel(channelName string, channelsMeta ChannelsMeta) (channel *Channel)
GetChannel expects the caller to handle locking
Click to show internal directories.
Click to hide internal directories.