esmodel

package
v1.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unquote

func Unquote(s []byte) (t string, err error)

Unquote copy from json.unquote

Types

type Action

type Action struct {
	ActionMeta
	// outbound data
	Content      Raw
	Peer         net.TCPAddr
	Request      Raw
	ResponseTime int64
	Response     Raw
	CSpanId      []byte
	SocketFD     int
}

type ActionMeta

type ActionMeta struct {
	ActionIndex int
	OccurredAt  int64
	ActionType  string
}

type CallFromInbound

type CallFromInbound struct {
	ActionMeta
	Peer     net.TCPAddr
	Request  Raw
	UnixAddr net.UnixAddr
}

type DataSource

type DataSource struct {
	Hits HitsOutside `json:"hits"`
}

ES存储的完整数据格式

type HitsInside

type HitsInside struct {
	Sess Session `json:"_source"`
}

type HitsOutside

type HitsOutside struct {
	Hits []HitsInside `json:"hits"`
}

type IDHitsInside

type IDHitsInside struct {
	IdSource SessionId `json:"_source"`
}

type IDHitsOutside

type IDHitsOutside struct {
	Hits []IDHitsInside `json:"hits"`
}

type IDSource

type IDSource struct {
	Hits IDHitsOutside `json:"hits"`
}

ES存储的sessionID数据格式

type Raw

type Raw struct {
	Data []byte
}

func (*Raw) UnmarshalJSON

func (r *Raw) UnmarshalJSON(data []byte) error

type ReturnInbound

type ReturnInbound struct {
	ActionMeta
	Response Raw
}

type Session

type Session struct {
	Context         string
	ThreadId        int32
	SessionId       string
	TraceId         string
	SpanId          string
	NextSessionId   string
	CallFromInbound *CallFromInbound
	ReturnInbound   *ReturnInbound
	Actions         []Action
}

func RetrieveSessions

func RetrieveSessions(data []byte) ([]Session, error)

type SessionId

type SessionId struct {
	Id string `json:"SessionId"`
}

func RetrieveSessionIds

func RetrieveSessionIds(data []byte) ([]SessionId, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL