Documentation
¶
Overview ¶
TODO: 实现gitlab ci images功能,实现容器化运行pipeline 1. 远程docker执行images功能 2. kubernetes集群执行images功能
Index ¶
- func NewHookAdapter(in HookMethod) *hook
- type Alert
- type CliInput
- type ConsoleOutput
- type Consumer
- type Email
- type HelloInput
- type HookMethod
- type KafkaInput
- type LifeCycle
- type LocalYaml
- type LocalYamlInput
- type MockConsumer
- type Records
- type ShellFilter
- type SshCheck
- type Text
- type UpperFilter
- type Wechat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CliInput ¶
type CliInput struct {
LifeCycle
// contains filtered or unexported fields
}
func (*CliInput) SetConnectStatus ¶
type ConsoleOutput ¶
type ConsoleOutput struct {
LifeCycle
// contains filtered or unexported fields
}
Console output插件,将消息输出到控制台上
func (*ConsoleOutput) Init ¶
func (c *ConsoleOutput) Init(data interface{})
func (*ConsoleOutput) Send ¶
func (c *ConsoleOutput) Send(msgs *plugin.Message)
type Email ¶
type Email struct {
Sid string `json:"sid"`
From string `json:"from"`
Name string `json:"name"`
To []string `json:"to"`
Smtp string `json:"smtp"`
SmtpPort int `json:"smtpport"`
Pwd string `json:"pwd"`
Subject string `json:"subject"`
Body string `json:"body"`
Range string `json:"range"` // 启动时间
}
func (*Email) IsCurrent ¶
'range': '星期一,星期二,星期三,星期四,星期五,星期六,星期天|01:05-23:59' 'range': '|00:00-23:59' 'range': '-'
func (*Email) SpecificSend ¶
type HelloInput ¶
type HelloInput struct {
// contains filtered or unexported fields
}
Hello input插件,接收“Hello World”消息
func (*HelloInput) Init ¶
func (h *HelloInput) Init(data interface{})
func (*HelloInput) Receive ¶
func (h *HelloInput) Receive() *plugin.Message
func (*HelloInput) Start ¶
func (h *HelloInput) Start()
func (*HelloInput) Status ¶
func (h *HelloInput) Status() plugin.StatusPlugin
func (*HelloInput) Stop ¶
func (h *HelloInput) Stop()
type HookMethod ¶
对内实现
type KafkaInput ¶
type KafkaInput struct {
// contains filtered or unexported fields
}
将上面原始struct转换成目标struct KafkaInput 重点:转换 特殊功能:添加Plugin Func
func (*KafkaInput) Receive ¶
func (k *KafkaInput) Receive() *plugin.Message
func (*KafkaInput) Start ¶
func (k *KafkaInput) Start()
func (*KafkaInput) Status ¶
func (k *KafkaInput) Status() plugin.StatusPlugin
func (*KafkaInput) Stop ¶
func (k *KafkaInput) Stop()
type LifeCycle ¶
type LifeCycle struct {
// contains filtered or unexported fields
}
功能:设置默认Start|Stop|Status 实现Filter Interface
func (*LifeCycle) Status ¶
func (l *LifeCycle) Status() plugin.StatusPlugin
type LocalYamlInput ¶
type LocalYamlInput struct {
LifeCycle
// contains filtered or unexported fields
}
func (*LocalYamlInput) Init ¶
func (l *LocalYamlInput) Init(data interface{})
LocalYamlInput的Init函数实现
func (*LocalYamlInput) Receive ¶
func (l *LocalYamlInput) Receive() *plugin.Message
func (*LocalYamlInput) SetConnectStatus ¶
func (l *LocalYamlInput) SetConnectStatus(ip, status string)
func (*LocalYamlInput) Start ¶
func (l *LocalYamlInput) Start()
type MockConsumer ¶
type MockConsumer struct{}
上述代码中的kafka.MockConsumer为我们模式Kafka消费者的一个实现,代码如下
func (*MockConsumer) Poll ¶
func (m *MockConsumer) Poll() *Records
type ShellFilter ¶
type ShellFilter struct {
LifeCycle
// contains filtered or unexported fields
}
shell 命令运行filter插件
func (*ShellFilter) Init ¶
func (s *ShellFilter) Init(data interface{})
type SshCheck ¶
type SshCheck struct {
// contains filtered or unexported fields
}
ssh主机check插件
func (*SshCheck) Status ¶
func (s *SshCheck) Status() plugin.StatusPlugin
type UpperFilter ¶
type UpperFilter struct {
// contains filtered or unexported fields
}
Upper filter插件,将消息全部字母转成大写
func (*UpperFilter) Init ¶
func (u *UpperFilter) Init(data interface{})
func (*UpperFilter) Start ¶
func (u *UpperFilter) Start()
func (*UpperFilter) Status ¶
func (u *UpperFilter) Status() plugin.StatusPlugin
func (*UpperFilter) Stop ¶
func (u *UpperFilter) Stop()
type Wechat ¶
type Wechat struct {
Sid string `json:"sid"`
Msgtype string `json:"msgtype"`
Articles string `json:"articles"`
Title string `json:"title"`
Description string `json:"description"`
Url string `json:"url"`
Picurl string `json:"picurl"`
Text Text `json:"text"`
Address []string `json:"address"`
Markdown Text `json:"markdown"`
Origin string
Range string `json:"range"`
}
func (*Wechat) SpecificSend ¶
Click to show internal directories.
Click to hide internal directories.