Documentation ¶
Index ¶
- func GetRawSessionFromES(ctx context.Context, req *idl.SearchReq) *esmodel.Session
- func GetRawSessionHandleLocal(ctx context.Context, contents []string, req *idl.SearchReq) *esmodel.Session
- func GetRawSessions(ctx context.Context, req *idl.SearchReq) *esmodel.Session
- func GetTrafficFromLocal(ctx context.Context, req *idl.SearchReq) (int, []string)
- func Query(ctx context.Context, req *idl.SearchReq, timeout time.Duration) ([]byte, error)
- func SearchPreHandle(req *idl.SearchReq) *idl.SearchReq
- type DSL
- type SearchRecord
- func AppendFlowList(flowList []*SearchRecord, req *idl.SearchReq, session esmodel.Session) []*SearchRecord
- func Search(ctx context.Context, req *idl.SearchReq) []*SearchRecord
- func SearchFromES(ctx context.Context, req *idl.SearchReq) []*SearchRecord
- func SearchHandleLocal(contents []string, req *idl.SearchReq) []*SearchRecord
- type SearchRecords
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRawSessionFromES ¶
func GetRawSessionHandleLocal ¶
func GetRawSessionHandleLocal(ctx context.Context, contents []string, req *idl.SearchReq) *esmodel.Session
GetRawSessionHandleLocal 处理本地流量符合GetRawSessions接口
func GetTrafficFromLocal ¶
GetTrafficFromLocal 从本地读取流量
Types ¶
type SearchRecord ¶
type SearchRecord struct { Project string `json:"project"` SessionId string `json:"sessionId"` Timestamp string `json:"timestamp"` Req string `json:"req"` RawReq string `json:"-"` Res string `json:"res"` RawRes string `json:"-"` Actions []map[string]string `json:"actions"` }
func AppendFlowList ¶
func AppendFlowList(flowList []*SearchRecord, req *idl.SearchReq, session esmodel.Session) []*SearchRecord
AppendFlowList 筛选流量并格式化,并追加到flowList数组
func Search ¶
func Search(ctx context.Context, req *idl.SearchReq) []*SearchRecord
*
- 前端查询ES数据接口(各种查询条件),超时10s
- @Return 多条session,封装成前端展示数据结构
func SearchFromES ¶
func SearchFromES(ctx context.Context, req *idl.SearchReq) []*SearchRecord
SearchFromES 从es读取数据,并处理按Search接口返回
func SearchHandleLocal ¶
func SearchHandleLocal(contents []string, req *idl.SearchReq) []*SearchRecord
SearchHandleLocal 处理本地流量符合Search接口
type SearchRecords ¶
type SearchRecords []*SearchRecord
Click to show internal directories.
Click to hide internal directories.