Documentation
¶
Index ¶
- Variables
- func ValidateSession(db *sql.DB, session string) error
- type Database
- type Event
- func (e *Event) Copy(srckey, newkey string)
- func (e *Event) GetInt64(key string) (int64, bool)
- func (e *Event) GetResourceUsageDesc() string
- func (e *Event) GetString(key string) string
- func (e *Event) GetTime(key string) time.Time
- func (e *Event) Name() string
- func (e *Event) Rename(oldkey, newkey string)
- func (e *Event) Set(key string, value interface{})
- func (e *Event) SetAppSource()
- func (e *Event) SetIfEmpty(key string, value interface{})
- func (e *Event) Timestamp() time.Time
- func (e *Event) ToJSON() (string, error)
- type FieldTypeKey
- type MapValueKey
- type Reader
- type SQLInfo
- type Session
- type XMLEventData
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound is returned for a non-existent session ErrNotFound = errors.New("session not found") // ErrNotRunning is return for autostart sessions that aren't running ErrNotRunning = errors.New("session not running") // ErrNoFileTarget is for running sessions that have no file target ErrNoFileTarget = errors.New("no file target") )
Functions ¶
Types ¶
type Event ¶
type Event map[string]interface{}
Event is a key value of entries for the XE event
func (*Event) GetResourceUsageDesc ¶
GetResourceUsageDesc returns a compressed CPU, Reads, Writes, Duration field
func (*Event) GetTime ¶
GetTime returns a time.Time if the value is time.Time Otherwise is returns a zero value time
func (*Event) Name ¶
Name returns the "name" attribute from the event It returns an empty string if not found or not a string
func (*Event) SetAppSource ¶
func (e *Event) SetAppSource()
SetAppSource creates the xecap_login_app_client event which is server_principal_name - client_app_name (client_hostname) and xecap_login_app
func (*Event) SetIfEmpty ¶
SetIfEmpty assigns a value at the key if it doesn't already exist
type FieldTypeKey ¶
FieldTypeKey is the key for fields structure
type MapValueKey ¶
MapValueKey is the lookup to the XE map value
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is an object for parsing XE events
type SQLInfo ¶
type SQLInfo struct { Server string Domain string Computer string // ProductLevel holds "SP1" ProductLevel string // ProductRelease holds "13.0" ProductRelease string // Version holds "SQL Server 2013" Version string // ProductVersion holds "13.0.5101.9" ProductVersion string Fields map[FieldTypeKey]string Actions map[string]string MapValues map[MapValueKey]string Databases map[int64]*Database LoginErrors map[int64]bool DB *sql.DB }
SQLInfo stores cached info about the server we connected to
func GetSQLInfo ¶
GetSQLInfo gets basic SQL Server info and lookup values
type XMLEventData ¶
type XMLEventData struct { Name string `xml:"name,attr"` TimeStamp time.Time `xml:"timestamp,attr"` DataValues []xmlData `xml:"data"` ActionValues []xmlAction `xml:"action"` }
XMLEventData holds the root for XE XML data