Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsolePusher ¶
type ConsolePusher struct {
// contains filtered or unexported fields
}
ConsolePusher 控制台日志推送器实现
func (*ConsolePusher) Push ¶
func (c *ConsolePusher) Push(ctx context.Context, entry Entry) error
Push 推送单条日志
func (*ConsolePusher) PushBatch ¶
func (c *ConsolePusher) PushBatch(ctx context.Context, entries []Entry) error
PushBatch 批量推送
func (*ConsolePusher) SetShowNode ¶
func (c *ConsolePusher) SetShowNode(show bool)
SetShowNode 设置是否显示节点信息
func (*ConsolePusher) SetShowTime ¶
func (c *ConsolePusher) SetShowTime(show bool)
SetShowTime 设置是否显示时间
type Entry ¶
type Entry struct {
Pipeline string `json:"pipeline"`
BuildID string `json:"buildId"`
Node string `json:"node"`
Step string `json:"step"`
Timestamp time.Time `json:"timestamp"`
Level Level `json:"level"`
Message string `json:"message"`
Output string `json:"output"` // 命令标准输出/错误
}
Entry 单条日志
Click to show internal directories.
Click to hide internal directories.