37 Star 395 Fork 72

GVPrancher/rancher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
driver.go 597 Bytes
一键复制 编辑 原始数据 按行查看 历史
phli 提交于 2018-02-13 21:33 . add pipeline support
package hooks
import (
"github.com/rancher/rancher/pkg/controllers/user/pipeline/hooks/drivers"
"github.com/rancher/types/config"
"net/http"
)
var Drivers map[string]Driver
type Driver interface {
Execute(req *http.Request) (int, error)
}
func RegisterDrivers(Management *config.ScaledContext) {
pipelines := Management.Management.Pipelines("")
pipelineExecutions := Management.Management.PipelineExecutions("")
Drivers = map[string]Driver{}
Drivers[drivers.GithubWebhookHeader] = drivers.GithubDriver{
Pipelines: pipelines,
PipelineExecutions: pipelineExecutions,
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/rancher/rancher.git
git@gitee.com:rancher/rancher.git
rancher
rancher
rancher
v2.0.15

搜索帮助

Cb406eda 1850385 E526c682 1850385