Documentation ¶
Index ¶
- Constants
- func DialLogServer(url string) error
- func Disconnect()
- func GetWatchLogFileSwitch(filePath string) bool
- func InsertStepLog(event *api.Event, stepevent StepEvent, state StepState, err error)
- func RemoveLogFile(filepath string) error
- func SendHeartBeat()
- func SetWatchLogFileSwitch(filePath string, watchSwitch bool)
- func WatchLogFile(filePath string, topic string)
- type HeatBeatPacket
- type PushLogPacket
- type StepEvent
- type StepState
Constants ¶
View Source
const ( LogSpecialMark string = "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" LogReplaceMark string = "--->" )
Variables ¶
This section is empty.
Functions ¶
func DialLogServer ¶
DialLogServer dial and connect to the log server e.g origin "http://120.26.103.63/" url "ws://120.26.103.63:8000/ws"
func GetWatchLogFileSwitch ¶
GetWatchLogFileSwitch set swicth of watch log file
func InsertStepLog ¶
InsertStepLog inserts the step information into the log file.
func RemoveLogFile ¶
RemoveLogFile is used to delete the log file.
func SendHeartBeat ¶
func SendHeartBeat()
SendHeartBeat send heat beat packet to log server per 30 seconds.
func SetWatchLogFileSwitch ¶
SetWatchLogFileSwitch set swicth of watch log file
func WatchLogFile ¶
WatchLogFile watch the log and prouce one line to kafka topic per 200ms
Types ¶
type HeatBeatPacket ¶
HeatBeatPacket is the type for heart_beat packet.
type PushLogPacket ¶
type PushLogPacket struct { Action string `json:"action"` Topic string `json:"topic"` Log string `json:"log"` }
PushLogPacket is the type for push_log packet.
type StepEvent ¶
type StepEvent string
StepEvent is information about step evnet name in creating versions
const ( CloneRepository StepEvent = "clone repository" CreateTag StepEvent = "create tag" BuildImage StepEvent = "Build image" PushImage StepEvent = "Push image" Integration StepEvent = "Integration" PreBuild StepEvent = "Pre Build" PostBuild StepEvent = "Post Build" Deploy StepEvent = "Deploy application" ApplyResource StepEvent = "Apply Resource" )
Click to show internal directories.
Click to hide internal directories.