Documentation ¶
Index ¶
- Constants
- Variables
- func QueryAppLog(c *gin.Context, queryInfo Common.QueryLogJson)
- func QueryContainerLog(c *gin.Context, queryInfo Common.QueryLogJson)
- func QueryCustomInfo(c *gin.Context)
- func QueryCustomLog(c *gin.Context, queryInfo Common.QueryLogJson)
- func QueryLogInfo(c *gin.Context)
- type SContainerLogger
- type SCustomLogger
- type SFileLogger
- type SMysqlLogger
- type SNginxLogger
- type SQueryContainerLogResult
- type SQueryCustomFileResult
- type SQueryCustomLogResult
- type SQueryMysqlLogResult
- type SQueryNginxLogResult
- type SQueryRedisLogResult
- type SRedisLogger
Constants ¶
View Source
const (
ESUrl string = "http://192.168.100.224:8056"
)
Variables ¶
View Source
var ( QueryNoResult = gin.H{ "return_code": 400, "err_info": "query not found", } ConnElasticsearchErr = gin.H{ "return_code": 401, "err_info": "elastic search connection error", } ErrElasticsearch = gin.H{ "return_code": 402, "err_info": "elastic search error", } InvalidQuery = gin.H{ "return_code": 403, "err_info": "invalid query", } /* m3 := map[string]string{ "a": "aa", "b": "bb", }*/ ArgEsHost = flag.String("elasticsearch_cluster_host", "http://172.16.10.169:9200", "host1:port1, host2:port2") EsHostArr = strings.Split(*ArgEsHost, ",") )
Functions ¶
func QueryAppLog ¶
func QueryAppLog(c *gin.Context, queryInfo Common.QueryLogJson)
func QueryContainerLog ¶
func QueryContainerLog(c *gin.Context, queryInfo Common.QueryLogJson)
func QueryCustomInfo ¶
func QueryCustomLog ¶
func QueryCustomLog(c *gin.Context, queryInfo Common.QueryLogJson)
func QueryLogInfo ¶
Types ¶
type SContainerLogger ¶
type SContainerLogger struct { Type string `json:"type"` Data struct { Container_uuid string `json:"container_uuid"` Environment_id string `json:"environment_id"` Namespace string `json:"namespace"` Container_name string `json:"container_name"` Timestamp string `json:"timestamp"` Log_info struct { Log_time string `json:"log_time"` Source string `json:"source"` Message string `json:"message"` } `json:"log_info"` } `json:"data"` }
type SCustomLogger ¶
type SCustomLogger struct { Type string `json:"type"` Data struct { Container_uuid string `json:"container_uuid"` Environment_id string `json:"environment_id"` App_file string `json:"app_file"` Timestamp string `json:"timestamp"` Log_info struct { Log_time string `json:"log_time"` Warn_type string `json:"warn_type"` Message string `json:"message"` } `json:"log_info"` } `json:"data"` }
type SFileLogger ¶
type SMysqlLogger ¶
type SMysqlLogger struct { Type string `json:"type"` Data struct { Container_uuid string `json:"container_uuid"` Environment_id string `json:"environment_id"` Namespace string `json:"namespace"` Container_name string `json:"container_name"` App_file string `json:"app_file"` Timestamp string `json:"timestamp"` Log_info struct { Log_time string `json:"log_time"` Warn_type string `json:"warn_type"` Message string `json:"message"` } `json:"log_info"` } `json:"data"` }
type SNginxLogger ¶
type SNginxLogger struct { Type string `json:"type"` Data struct { Container_uuid string `json:"container_uuid"` Environment_id string `json:"environment_id"` Container_name string `json:"container_name"` Namespace string `json:"namespace"` App_file string `json:"app_file"` Timestamp string `json:"timestamp"` Log_info struct { Log_time string `json:"log_time"` Remote string `json:"remote"` Host string `json:"host"` Container_uuid string `json:"user"` User string `json:"method"` Path string `json:"path"` Code string `json:"code"` Size string `json:"size"` Referer string `json:"referer"` Agent string `json:"agent"` } `json:"log_info"` } `json:"data"` }
type SQueryContainerLogResult ¶
type SQueryContainerLogResult struct { Return_code int64 `json:"return_code"` Current_query_result_length int64 `json:"current_query_result_length"` All_query_result_length int64 `json:"all_query_result_length"` Type string `json:"type"` Query_result []SContainerLogger `json:"query_result"` }
type SQueryCustomFileResult ¶
type SQueryCustomFileResult struct { Return_code int64 `json:"return_code"` Type string `json:"type"` Query_result []SFileLogger `json:"query_result"` }
type SQueryCustomLogResult ¶
type SQueryCustomLogResult struct { Return_code int64 `json:"return_code"` Current_query_result_length int64 `json:"current_query_result_length"` All_query_result_length int64 `json:"all_query_result_length"` Type string `json:"type"` Query_result []SCustomLogger `json:"query_result"` }
type SQueryMysqlLogResult ¶
type SQueryMysqlLogResult struct { Return_code int64 `json:"return_code"` Current_query_result_length int64 `json:"current_query_result_length"` All_query_result_length int64 `json:"all_query_result_length"` Type string `json:"type"` Query_result []SMysqlLogger `json:"query_result"` }
type SQueryNginxLogResult ¶
type SQueryNginxLogResult struct { Return_code int64 `json:"return_code"` Current_query_result_length int64 `json:"current_query_result_length"` All_query_result_length int64 `json:"all_query_result_length"` Type string `json:"type"` Query_result []SNginxLogger `json:"query_result"` }
type SQueryRedisLogResult ¶
type SQueryRedisLogResult struct { Return_code int64 `json:"return_code"` Current_query_result_length int64 `json:"current_query_result_length"` All_query_result_length int64 `json:"all_query_result_length"` Type string `json:"type"` Query_result []SRedisLogger `json:"query_result"` }
type SRedisLogger ¶
type SRedisLogger struct { Type string `json:"type"` Data struct { Container_uuid string `json:"container_uuid"` Environment_id string `json:"environment_id"` Namespace string `json:"namespace"` Container_name string `json:"container_name"` App_file string `json:"app_file"` Timestamp string `json:"timestamp"` Log_info struct { Log_time string `json:"log_time"` Warn_type string `json:"warn_type"` Message string `json:"message"` } `json:"log_info"` } `json:"data"` }
Click to show internal directories.
Click to hide internal directories.