Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProcessEventStart = "start" ProcessEventStdout = "stdout" ProcessEventStderr = "stderr" ProcessEventStop = "stop" )
Variables ¶
View Source
var HTTPClient = &http.Client{ Timeout: 60 * time.Second, Transport: &http.Transport{ TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, }, MaxIdleConnsPerHost: 5, }, }
公用的HTTP客户端
View Source
var LongHTTPClient = &http.Client{ Timeout: 300 * time.Second, Transport: &http.Transport{ TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, }, MaxIdleConnsPerHost: 5, }, }
长时间的HTTP客户端
Functions ¶
func PushEvent ¶
func PushEvent(event EventInterface)
Types ¶
type EventInterface ¶
type ItemEvent ¶
type ItemEvent struct { Event string `json:"event"` AgentId string `json:"agentId"` AppId string `json:"appId"` ItemId string `json:"itemId"` Value interface{} `json:"value"` Error string `json:"error"` BeginAt int64 `json:"beginAt"` Timestamp int64 `json:"timestamp"` CostMs float64 `json:"costMs"` }
监控项事件
type Process ¶
type ProcessEvent ¶
type ProcessEvent struct { Event string `json:"event"` AgentId string `json:"agentId"` AppId string `json:"appId"` TaskId string `json:"taskId"` UniqueId string `json:"uniqueId"` Pid int `json:"pid"` EventType ProcessEventType `json:"eventType"` Data string `json:"data"` Timestamp int64 `json:"timestamp"` }
进程日志
func NewProcessEvent ¶
func NewProcessEvent(eventType ProcessEventType, appId string, taskId string, uniqueId string, pid int, data []byte) *ProcessEvent
新日志对象
type Server ¶
type Server struct { Addr string // contains filtered or unexported fields }
Agent提供的Web Server,可以用来读取状态、进行控制等
type StderrLogWriter ¶
type StdoutLogWriter ¶
日志写入器
Source Files ¶
- app.go
- bootstrap.go
- bootstrap_boot_tasks.go
- bootstrap_download.go
- bootstrap_help.go
- bootstrap_init.go
- bootstrap_local.go
- bootstrap_pull.go
- bootstrap_push.go
- bootstrap_run.go
- bootstrap_schedule.go
- bootstrap_start.go
- bootstrap_status.go
- bootstrap_stop.go
- bootstrap_test_connection.go
- bootstrap_upgrade.go
- bootstrap_version.go
- event.go
- event_queue.go
- http_client.go
- item.go
- item_event.go
- process.go
- process_event.go
- process_log_writer.go
- retrieve_os.go
- server.go
- task.go
Click to show internal directories.
Click to hide internal directories.