Documentation ¶
Index ¶
- Constants
- Variables
- func SVar(v interface{}) string
- func TopOfTheHour() (prev, cur string)
- func TraceDbEndQry(s string, v ...interface{}) time.Duration
- func TraceDbStartQry(s string)
- func TraceFunc(name string, args ...interface{})
- func TraceFuncExit(name string)
- type ANote
- type APathMatch
- type AnItemType
- type AvgTime
- type DBQryHash
- type DBTiming
- type FuncData
- type OnOffIgnore
- type QryData
- type TraceConfig
- type TraceItem
- type Trx
- func (this *Trx) AddData(i string, m url.Values, fr map[string]string)
- func (this *Trx) AddNote(depth int, note string)
- func (this *Trx) At(depth int)
- func (this *Trx) ErrorReturn(depth int, err error)
- func (this *Trx) GetKeySeqNo() (int64, int)
- func (this *Trx) IncrSeqNo() int
- func (this *Trx) MatchedPath(depth int, note string)
- func (this *Trx) NextNoMatch(depth int, note string)
- func (this *Trx) PathMatched(depth int, middlewareName string, path []string, pn int, url string)
- func (this *Trx) SaveIt()
- func (this *Trx) SavePointOn(x int) bool
- func (this *Trx) SetCacheData(sql string, depth int, rvData string, data ...interface{})
- func (this *Trx) SetDataPs(data []common.NameValueFrom)
- func (this *Trx) SetFrom(from string)
- func (this *Trx) SetFunc(depth int)
- func (this *Trx) SetFuncRet(depth int)
- func (this *Trx) SetHeader(h http.Header)
- func (this *Trx) SetQry(sql string, depth int, data ...interface{})
- func (this *Trx) SetQryDone(qError string, rvData string)
- func (this *Trx) SetRvBody(rvBody string)
- func (this *Trx) SetSavePoint(s string, on bool)
- func (this *Trx) SetTablesUsed(tableList []string)
- func (this *Trx) SetTraceDebug(db bool)
- func (this *Trx) SetUserInfo(username string, user_id string, auth_token string)
- func (this *Trx) StartSeqNo() int
- func (this *Trx) TraceDb(name string, qry string, args ...interface{})
- func (this *Trx) TraceDb2(name string, qry string, args ...interface{})
- func (this *Trx) TraceDbData(name string, qry string, args ...interface{})
- func (this *Trx) TraceDbEnd(name string, qry string, n_rows int)
- func (this *Trx) TraceDbError(name string, qry string, err error)
- func (this *Trx) TraceDbError2(name string, qry string, err error)
- func (this *Trx) TraceDbRet(name string, args ...interface{})
- func (this *Trx) TraceDbRetJson(name string, data string)
- func (this *Trx) TraceGetConfig() (uint64, bool)
- func (this *Trx) TraceInitConfig(r *pool.Pool)
- func (this *Trx) TraceSetConfig(p_ttl uint64, p_trace_on bool, p_stdout_on bool)
- func (this *Trx) TraceUri(req *http.Request, mm url.Values)
- func (this *Trx) TraceUriPs(req *http.Request, ps string)
- func (this *Trx) TraceUriRaw(req *http.Request)
- func (this *Trx) TraceUriRawEnd(req *http.Request, elapsedTime time.Duration)
- func (this *Trx) TraceUriRawEndHijacked(req *http.Request, elapsedTime time.Duration)
- func (this *Trx) TrxIdSeen(TrxId, URL, Method string)
- func (this *Trx) UpdateDataPs(data []common.NameValueFrom)
- func (this *Trx) UriSaveData(clientIP string, runAtTime time.Time, method string, uri string, ...)
- func (this *Trx) UriStart(uri string)
Constants ¶
const ISO8601 = "2006-01-02T15:04:05.99999Z07:00"
------------------------------------------------------------------------------------------------------------------------------------------
Variables ¶
var Ttl uint64 = default_ttl
Functions ¶
func SVar ¶
func SVar(v interface{}) string
------------------------------------------------------------------------------------------------------------------------------------------
func TopOfTheHour ¶
func TopOfTheHour() (prev, cur string)
func TraceDbEndQry ¶
func TraceDbStartQry ¶
func TraceDbStartQry(s string)
func TraceFunc ¶
func TraceFunc(name string, args ...interface{})
----------------------------------------------------------------------------------------------------------
func TraceFuncExit ¶
func TraceFuncExit(name string)
----------------------------------------------------------------------------------------------------------
Types ¶
type ANote ¶
this.Note = append ( this.Note, ANote{ Txt:note, File:file, Line:fmt.Sprintf("%d",line), FuncName:xfunc ) } )
type APathMatch ¶
type AnItemType ¶
type AnItemType int
----------------------------------------------------------------------------------------------------------
const ( Fx AnItemType = iota User // Implemented at the D.B. & Fucntion level URI Table Db Redis )
type DBQryHash ¶
var TimeDbCall DBQryHash
----------------------------------------------------------------------------------------------------------
type DBTiming ¶
type DBTiming struct {
// contains filtered or unexported fields
}
----------------------------------------------------------------------------------------------------------
type OnOffIgnore ¶
type OnOffIgnore int
----------------------------------------------------------------------------------------------------------
const ( On OnOffIgnore = iota Off Ignore )
type QryData ¶
type QryData struct { SQL string BindData []interface{} Time string RvData string QError string File string Line string FuncName string }
{ "SQL": "select...", "Data": [ ... ], "Time": ..., "RvData": [ ... ], "FuncName":... }
type TraceConfig ¶
----------------------------------------------------------------------------------------------------------
type TraceItem ¶
type TraceItem struct { ItemType AnItemType // func, user, URI, table OnOff OnOffIgnore // Is item T=included or F=excluded, i=ignored Data1 string Data2 string }
----------------------------------------------------------------------------------------------------------
type Trx ¶
type Trx struct { Key int Data []common.NameValueFrom Func []FuncData From string Qry []QryData RvBody string ClientIp string RequestTime string Method, Uri, Protocol string Status int ResponseBytes int64 ElapsedTime string // In Seconds ElapsedTimeMs string // In Milesconds TableList []string Note []ANote Username string User_id string Auth_token string HasBeenSaved bool IAm string MiddlewareStk []APathMatch RequestId string Header http.Header // contains filtered or unexported fields }
func (*Trx) ErrorReturn ¶
func (*Trx) GetKeySeqNo ¶
func (*Trx) MatchedPath ¶
func (*Trx) NextNoMatch ¶
func (*Trx) PathMatched ¶
func (*Trx) SavePointOn ¶
func (*Trx) SetCacheData ¶
func (*Trx) SetDataPs ¶
func (this *Trx) SetDataPs(data []common.NameValueFrom)
func (*Trx) SetFuncRet ¶
func (*Trx) SetQryDone ¶
trx.QryDone ( RvData ) -- opt-save --
func (*Trx) SetSavePoint ¶
func (*Trx) SetTablesUsed ¶
func (*Trx) SetTraceDebug ¶
func (*Trx) SetUserInfo ¶
trx.From ( ... )
func (*Trx) StartSeqNo ¶
func (this *Trx) IncrKeyNo() int64 { g_key_no = this.getRedisIncrKey("rest:trace:uri:key1") return g_key_no }
func (*Trx) TraceDb ¶
----------------------------------------------------------------------------------------------------------
func (*Trx) TraceDbData ¶
func (*Trx) TraceDbRet ¶
func (*Trx) TraceDbRetJson ¶
func (*Trx) TraceGetConfig ¶
func (*Trx) TraceInitConfig ¶
func (*Trx) TraceSetConfig ¶
func (*Trx) TraceUri ¶
----------------------------------------------------------------------------------------------------------
func (*Trx) TraceUriPs ¶
---------------------------------------------------------------------------------------------------------- ps is convered ps.DumpParams() from the Params package // ps *goftlmux.Params
func (*Trx) TraceUriRaw ¶
func (*Trx) TraceUriRawEnd ¶
func (*Trx) TraceUriRawEndHijacked ¶
func (*Trx) UpdateDataPs ¶
func (this *Trx) UpdateDataPs(data []common.NameValueFrom)