notify

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WatchConfig = watchConfig{}

Functions

func CommandStart

func CommandStart() error

////////////////// 检测远程git仓库、本地仓库、docker仓库是否有更新 需要本地环境已经包含,git、docker环境 //////////////////

func DockerLocal

func DockerLocal() chan bool

func DockerRemote

func DockerRemote(ctx context.Context, name string, interval time.Duration) chan struct{}

func GitLocal

func GitLocal() chan bool

func GitRemote

func GitRemote() chan bool

监听远程仓库,需要将代码拉取到临时目录下(当前程序结束自动删除),然后定时去执行检查远程某个分支的最新commit-sha1 如果发生了更改(最初的数据是程序启动时的commit, 即如果程序退出时发生更改则无法监听到)则进行通知

func ParseFromYaml

func ParseFromYaml(file string) (*specHook, error)

Types

type INotify

type INotify interface {
	Watch(chan struct{}) error // 开启监听
}

Jump to

Keyboard shortcuts

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