Documentation ¶
Overview ¶
Copyright 2022-present Kuei-chun Chen. All rights reserved.
Copyright 2022-present Kuei-chun Chen. All rights reserved. logs_template.go
Index ¶
- Constants
- Variables
- func APIHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func AddLegacyString(doc *Logv2Info) error
- func BsonD2M(d bson.D) bson.M
- func ChartsHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func CheckDriverCompatibility(mongo string, driver string, version string) error
- func CheckLuhn(card string) bool
- func ContainsCreditCardNo(card string) bool
- func ContainsEmailAddress(email string) bool
- func ContainsFQDN(fqdn string) bool
- func ContainsIP(ip string) bool
- func ContainsPhoneNo(phoneNo string) bool
- func CreateIndexes(db *sql.DB, hatchetName string) ([]string, error)
- func CreateTables(db *sql.DB, hatchetName string) ([]string, error)
- func DriverHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func EscapeString(value string) string
- func FaviconHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func GetAuditTablesTemplate() (*template.Template, error)
- func GetBufioReader(data []byte) (*bufio.Reader, error)
- func GetChartTemplate(chartType string) (*template.Template, error)
- func GetClientPreparedStmt(hatchetName string) string
- func GetDriverPreparedStmt(hatchetName string) string
- func GetDriverVersions(mongo string, driver string) ([]interface{}, error)
- func GetDrivers() *map[string]interface{}
- func GetHTTPContent(url, username, password string) (*bufio.Reader, error)
- func GetHTTPDigestContent(url, user, secret string) (*bufio.Reader, error)
- func GetHatchetPreparedStmt(hatchetName string) string
- func GetHatchetSummary(info HatchetInfo) string
- func GetLogTableTemplate(attr string) (*template.Template, error)
- func GetMarkerHTML(marker int) string
- func GetMongoDateSubString(start string, end string) bson.M
- func GetOffsetLimit(str string) (int, int)
- func GetSQLDateSubString(start string, end string) string
- func GetStatsTableTemplate(collscan bool, orderBy string, download string) (*template.Template, error)
- func GetTablesTemplate() (*template.Template, error)
- func Handler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func Hello(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func InsertBiosIntoMongoDB(uri string, numDocuments int) error
- func IsNamespace(ns string) bool
- func IsSSN(s string) bool
- func LogsHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func ObfuscateWord(word string) string
- func Run(fullVersion string)
- func SimulateReads(url string) error
- func SimulateTests(test string, url string) error
- func SimulateWrites(url string) error
- func StatsHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func ToFloat64(num interface{}) float64
- func ToInt(num interface{}) int
- type Attributes
- type Bio
- type Chart
- type Database
- type FailedMessages
- type HatchetInfo
- type LegacyLog
- type Logv2
- type Logv2Info
- type MongoDB
- func (ptr *MongoDB) Begin() error
- func (ptr *MongoDB) Close() error
- func (ptr *MongoDB) Commit() error
- func (ptr *MongoDB) CreateMetaData() error
- func (ptr *MongoDB) Drop() error
- func (ptr *MongoDB) GetAcceptedConnsCounts(duration string) ([]NameValue, error)
- func (ptr *MongoDB) GetAuditData() (map[string][]NameValues, error)
- func (ptr *MongoDB) GetAverageOpTime(op string, duration string) ([]OpCount, error)
- func (ptr *MongoDB) GetConnectionStats(chartType string, duration string) ([]RemoteClient, error)
- func (ptr *MongoDB) GetHatchetInfo() HatchetInfo
- func (ptr *MongoDB) GetHatchetNames() ([]string, error)
- func (ptr *MongoDB) GetLogs(opts ...string) ([]LegacyLog, error)
- func (ptr *MongoDB) GetOpsCounts(duration string) ([]NameValue, error)
- func (ptr *MongoDB) GetReslenByIP(ip string, duration string) ([]NameValue, error)
- func (ptr *MongoDB) GetReslenByNamespace(ns string, duration string) ([]NameValue, error)
- func (ptr *MongoDB) GetSlowOps(orderBy string, order string, collscan bool) ([]OpStat, error)
- func (ptr *MongoDB) GetSlowestLogs(topN int) ([]LegacyLog, error)
- func (ptr *MongoDB) GetVerbose() bool
- func (ptr *MongoDB) InsertClientConn(index int, doc *Logv2Info) error
- func (ptr *MongoDB) InsertDriver(index int, doc *Logv2Info) error
- func (ptr *MongoDB) InsertFailedMessages(m *FailedMessages) error
- func (ptr *MongoDB) InsertLog(index int, end string, doc *Logv2Info, stat *OpStat) error
- func (ptr *MongoDB) SearchLogs(opts ...string) ([]LegacyLog, error)
- func (ptr *MongoDB) SetVerbose(b bool)
- func (ptr *MongoDB) UpdateHatchetInfo(info HatchetInfo) error
- type NameValue
- type NameValues
- type Obfuscation
- func (ptr *Obfuscation) ObfuscateBsonA(a bson.A) bson.A
- func (ptr *Obfuscation) ObfuscateBsonD(d bson.D) bson.D
- func (ptr *Obfuscation) ObfuscateCreditCardNo(cardNo string) string
- func (ptr *Obfuscation) ObfuscateEmail(email string) string
- func (ptr *Obfuscation) ObfuscateFQDN(fqdn string) string
- func (ptr *Obfuscation) ObfuscateFile(filename string) error
- func (ptr *Obfuscation) ObfuscateIP(ip string) string
- func (ptr *Obfuscation) ObfuscateInt(data interface{}) int
- func (ptr *Obfuscation) ObfuscateNS(ns string) string
- func (ptr *Obfuscation) ObfuscateNumber(data interface{}) float64
- func (ptr *Obfuscation) ObfuscatePhoneNo(phoneNo string) string
- func (ptr *Obfuscation) ObfuscateSSN(ssn string) string
- func (ptr *Obfuscation) ObfuscateString(value string) string
- type OpCount
- type OpStat
- type RemoteClient
- type S3Client
- type SQLite3DB
- func (ptr *SQLite3DB) Begin() error
- func (ptr *SQLite3DB) Close() error
- func (ptr *SQLite3DB) Commit() error
- func (ptr *SQLite3DB) CreateMetaData() error
- func (ptr *SQLite3DB) Drop() error
- func (ptr *SQLite3DB) GetAcceptedConnsCounts(duration string) ([]NameValue, error)
- func (ptr *SQLite3DB) GetAuditData() (map[string][]NameValues, error)
- func (ptr *SQLite3DB) GetAverageOpTime(op string, duration string) ([]OpCount, error)
- func (ptr *SQLite3DB) GetConnectionStats(chartType string, duration string) ([]RemoteClient, error)
- func (ptr *SQLite3DB) GetHatchetInfo() HatchetInfo
- func (ptr *SQLite3DB) GetHatchetNames() ([]string, error)
- func (ptr *SQLite3DB) GetLogs(opts ...string) ([]LegacyLog, error)
- func (ptr *SQLite3DB) GetOpsCounts(duration string) ([]NameValue, error)
- func (ptr *SQLite3DB) GetReslenByIP(ip string, duration string) ([]NameValue, error)
- func (ptr *SQLite3DB) GetReslenByNamespace(ns string, duration string) ([]NameValue, error)
- func (ptr *SQLite3DB) GetSlowOps(orderBy string, order string, collscan bool) ([]OpStat, error)
- func (ptr *SQLite3DB) GetSlowestLogs(topN int) ([]LegacyLog, error)
- func (ptr *SQLite3DB) GetVerbose() bool
- func (ptr *SQLite3DB) InsertClientConn(index int, doc *Logv2Info) error
- func (ptr *SQLite3DB) InsertDriver(index int, doc *Logv2Info) error
- func (ptr *SQLite3DB) InsertFailedMessages(m *FailedMessages) error
- func (ptr *SQLite3DB) InsertLog(index int, end string, doc *Logv2Info, stat *OpStat) error
- func (ptr *SQLite3DB) SearchLogs(opts ...string) ([]LegacyLog, error)
- func (ptr *SQLite3DB) SetVerbose(b bool)
- func (ptr *SQLite3DB) UpdateHatchetInfo(info HatchetInfo) error
Constants ¶
const ( BioDBName = "hatchet" BioCollName = "bios" )
const ( BAR_CHART = "bar_chart" BUBBLE_CHART = "bubble_chart" PIE_CHART = "pie_chart" T_OPS = "ops" T_RESLEN_UP = "reslen-ip" T_OPS_COUNTS = "ops-counts" T_CONNS_ACCEPTED = "connections-accepted" T_CONNS_TIME = "connections-time" T_CONNS_TOTAL = "connections-total" T_RESLEN_NS = "reslen-ns" )
const ( SQLite3 = iota Mongo )
const ( HTML_API_PREFIX = "/hatchets/" REST_API_PREFIX = "/api/hatchet/v1.0/hatchets/" )
const ( CHEN_ICO = `` /* 5716-byte string literal not displayed */ SAGE_PNG = `` /* 11196-byte string literal not displayed */ SIMONE_PNG = `` /* 18360-byte string literal not displayed */ HATCHET_PNG = `` /* 2412-byte string literal not displayed */ )
const ( COLLSCAN = "COLLSCAN" DOLLAR_CMD = "$cmd" LIMIT = 100 TOP_N = 23 )
const ( MAX_DOC_SIZE = 16 * (1024 * 1024) BATCH_SIZE = 1000 )
const ( MAX_SIZE = 64 TAIL_SIZE = 7 )
const MIN_MONGO_VER = "5.0"
const SQLITE3_FILE = "./data/hatchet.db"
Variables ¶
var ( SEVERITIES = []string{"F", "E", "W", "I", "D", "D2"} SEVERITY_M = map[string]string{"F": "FATAL", "E": "ERROR", "W": "WARN", "I": "INFO", "D": "DEBUG", "D2": "DEBUG2"} )
Functions ¶
func APIHandler ¶ added in v0.3.1
func APIHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
APIHandler responds to API calls
func AddLegacyString ¶
AddLegacyString converts log to legacy format
func ChartsHandler ¶ added in v0.3.1
func ChartsHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
ChartsHandler responds to charts API calls
func CheckDriverCompatibility ¶ added in v0.4.5
func ContainsCreditCardNo ¶ added in v0.4.5
func ContainsEmailAddress ¶ added in v0.4.5
func ContainsFQDN ¶ added in v0.4.5
func ContainsIP ¶ added in v0.4.5
func ContainsPhoneNo ¶ added in v0.4.5
func CreateIndexes ¶ added in v0.5.0
CreateIndexes returns init statement
func CreateTables ¶ added in v0.5.0
CreateTables returns init statement
func DriverHandler ¶ added in v0.4.5
func DriverHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
DriverHandler responds to API calls
func EscapeString ¶ added in v0.2.0
func FaviconHandler ¶ added in v0.3.1
func FaviconHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
func GetAuditTablesTemplate ¶ added in v0.3.1
GetAuditTablesTemplate returns HTML
func GetChartTemplate ¶
GetChartTemplate returns HTML
func GetClientPreparedStmt ¶ added in v0.4.5
GetClientPreparedStmt returns prepared statement of clients table
func GetDriverPreparedStmt ¶ added in v0.4.5
GetDriverPreparedStmt returns prepared statement of drivers table
func GetDriverVersions ¶ added in v0.4.5
func GetDrivers ¶ added in v0.4.5
func GetDrivers() *map[string]interface{}
GetDrivers returns *map[string]interface{} instance
func GetHTTPContent ¶ added in v0.3.3
func GetHTTPDigestContent ¶ added in v0.3.3
func GetHatchetPreparedStmt ¶ added in v0.4.5
GetHatchetPreparedStmt returns prepared statement of the hatchet table
func GetHatchetSummary ¶ added in v0.2.0
func GetHatchetSummary(info HatchetInfo) string
func GetLogTableTemplate ¶
GetLogTableTemplate returns HTML
func GetMarkerHTML ¶ added in v0.6.0
func GetMongoDateSubString ¶ added in v0.4.5
func GetOffsetLimit ¶ added in v0.2.0
GetOffsetLimit returns offset, limit
func GetSQLDateSubString ¶ added in v0.4.5
func GetStatsTableTemplate ¶
func GetStatsTableTemplate(collscan bool, orderBy string, download string) (*template.Template, error)
GetStatsTableTemplate returns HTML
func GetTablesTemplate ¶
GetTablesTemplate returns HTML
func Handler ¶ added in v0.3.1
func Handler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
Handler responds to API calls
func Hello ¶ added in v0.3.1
func Hello(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func Index ¶ added in v0.3.1
func Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func InsertBiosIntoMongoDB ¶ added in v0.4.5
func IsNamespace ¶ added in v0.4.5
func LogsHandler ¶ added in v0.3.1
func LogsHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
LogsHandler responds to charts API calls
func ObfuscateWord ¶ added in v0.4.5
func SimulateReads ¶ added in v0.4.5
func SimulateTests ¶ added in v0.4.5
func SimulateWrites ¶ added in v0.4.5
func StatsHandler ¶ added in v0.3.1
func StatsHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
StatsHandler responds to API calls
Types ¶
type Attributes ¶
type Attributes struct { Command map[string]interface{} `json:"command" bson:"command"` ErrMsg string `json:"errMsg" bson:"errMsg"` Milli int `json:"durationMillis" bson:"durationMillis"` NS string `json:"ns" bson:"ns"` OriginatingCommand map[string]interface{} `json:"originatingCommand" bson:"originatingCommand"` PlanSummary string `json:"planSummary" bson:"planSummary"` Reslen int `json:"reslen" bson:"reslen"` Type string `json:"type" bson:"type"` }
type Bio ¶ added in v0.4.5
type Bio struct { Age int `bson:"age" json:"age"` Company string `bson:"company" json:"company"` CreditCards []string `bson:"credit_cards" json:"credit_cards"` Emails []string `bson:"emails" json:"emails"` FirstName string `bson:"first_name" json:"first_name"` Intro string `bson:"intro" json:"intro"` LastName string `bson:"last_name" json:"last_name"` Phones []string `bson:"phones" json:"phones"` Title string `bson:"title" json:"title"` SSN string `bson:"ssn" json:"ssn"` State string `bson:"state" json:"state"` URL string `bson:"url" json:"url"` }
type Database ¶ added in v0.2.0
type Database interface { Begin() error Close() error Commit() error CreateMetaData() error Drop() error GetAcceptedConnsCounts(duration string) ([]NameValue, error) GetAuditData() (map[string][]NameValues, error) GetAverageOpTime(op string, duration string) ([]OpCount, error) GetConnectionStats(chartType string, duration string) ([]RemoteClient, error) GetHatchetInfo() HatchetInfo GetHatchetNames() ([]string, error) GetLogs(opts ...string) ([]LegacyLog, error) GetOpsCounts(duration string) ([]NameValue, error) GetReslenByNamespace(ip string, duration string) ([]NameValue, error) GetReslenByIP(ip string, duration string) ([]NameValue, error) GetSlowOps(orderBy string, order string, collscan bool) ([]OpStat, error) GetSlowestLogs(topN int) ([]LegacyLog, error) GetVerbose() bool InsertClientConn(index int, doc *Logv2Info) error InsertDriver(index int, doc *Logv2Info) error InsertFailedMessages(m *FailedMessages) error InsertLog(index int, end string, doc *Logv2Info, stat *OpStat) error SearchLogs(opts ...string) ([]LegacyLog, error) SetVerbose(v bool) UpdateHatchetInfo(info HatchetInfo) error }
func GetDatabase ¶ added in v0.2.0
type FailedMessages ¶ added in v0.5.0
type FailedMessages struct {
// contains filtered or unexported fields
}
type HatchetInfo ¶ added in v0.2.0
type HatchetInfo struct { Arch string `bson:"arch"` End string `bson:"end"` Merge bool `bson:"merge"` Module string `bson:"module"` Name string `bson:"name"` OS string `bson:"os"` Start string `bson:"start"` Version string `bson:"version"` Drivers []map[string]string Provider string `bson:"region"` Region string `bson:"provider"` }
type LegacyLog ¶
type LegacyLog struct { Timestamp string `json:"date" bson:"date"` Severity string `json:"severity" bson:"severity"` Component string `json:"component" bson:"component"` Context string `json:"context" bson:"context"` Marker int Message string `json:"message" bson:"message"` // remaining legacy message }
type Logv2 ¶
type Logv2 struct {
// contains filtered or unexported fields
}
Logv2 keeps Logv2 object
func (*Logv2) PrintSummary ¶
type Logv2Info ¶
type Logv2Info struct { Attr bson.D `json:"attr" bson:"attr"` Component string `json:"c" bson:"c"` Context string `json:"ctx" bson:"ctx"` ID int `json:"id" bson:"id"` Msg string `json:"msg" bson:"msg"` Severity string `json:"s" bson:"s"` Timestamp time.Time `json:"t" bson:"t"` Attributes Attributes Message string // remaining legacy message Client *RemoteClient Marker int }
Logv2Info stores logv2 struct
type MongoDB ¶ added in v0.4.5
type MongoDB struct {
// contains filtered or unexported fields
}
func NewMongoDB ¶ added in v0.4.5
func (*MongoDB) CreateMetaData ¶ added in v0.4.5
func (*MongoDB) GetAcceptedConnsCounts ¶ added in v0.4.5
GetAcceptedConnsCounts returns opened connection counts
func (*MongoDB) GetAuditData ¶ added in v0.4.5
func (ptr *MongoDB) GetAuditData() (map[string][]NameValues, error)
func (*MongoDB) GetAverageOpTime ¶ added in v0.4.5
func (*MongoDB) GetConnectionStats ¶ added in v0.4.5
func (ptr *MongoDB) GetConnectionStats(chartType string, duration string) ([]RemoteClient, error)
GetConnectionStats returns stats data of accepted and ended
func (*MongoDB) GetHatchetInfo ¶ added in v0.4.5
func (ptr *MongoDB) GetHatchetInfo() HatchetInfo
func (*MongoDB) GetHatchetNames ¶ added in v0.4.5
func (*MongoDB) GetOpsCounts ¶ added in v0.4.5
GetOpsCounts returns opened connection counts
func (*MongoDB) GetReslenByIP ¶ added in v0.4.5
GetReslenByIP returns total response length by ip
func (*MongoDB) GetReslenByNamespace ¶ added in v0.4.5
GetReslenByNamespace returns total response length by ns
func (*MongoDB) GetSlowOps ¶ added in v0.4.5
func (*MongoDB) GetSlowestLogs ¶ added in v0.4.5
func (*MongoDB) GetVerbose ¶ added in v0.4.5
func (*MongoDB) InsertClientConn ¶ added in v0.4.5
func (*MongoDB) InsertDriver ¶ added in v0.4.5
func (*MongoDB) InsertFailedMessages ¶ added in v0.5.0
func (ptr *MongoDB) InsertFailedMessages(m *FailedMessages) error
func (*MongoDB) SearchLogs ¶ added in v0.4.5
func (*MongoDB) SetVerbose ¶ added in v0.4.5
func (*MongoDB) UpdateHatchetInfo ¶ added in v0.4.5
func (ptr *MongoDB) UpdateHatchetInfo(info HatchetInfo) error
type NameValues ¶ added in v0.3.1
type NameValues struct { Name string Values []interface{} }
type Obfuscation ¶ added in v0.4.5
type Obfuscation struct { Coefficient float64 `json:"coefficient"` CardMap map[string]string `json:"card_map"` IPMap map[string]string `json:"ip_map"` NameMap map[string]string `json:"name_map"` PhoneMap map[string]string `json:"phone_map"` SSNMap map[string]string `json:"ssn_map"` // contains filtered or unexported fields }
func NewObfuscation ¶ added in v0.4.5
func NewObfuscation() *Obfuscation
func (*Obfuscation) ObfuscateBsonA ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateBsonA(a bson.A) bson.A
func (*Obfuscation) ObfuscateBsonD ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateBsonD(d bson.D) bson.D
func (*Obfuscation) ObfuscateCreditCardNo ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateCreditCardNo(cardNo string) string
ObfuscateCreditCardNo obfuscate digits with '*' except for last 4 digits
func (*Obfuscation) ObfuscateEmail ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateEmail(email string) string
ObfuscateEmail replace domain name with a city name and user name with a flower name
func (*Obfuscation) ObfuscateFQDN ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateFQDN(fqdn string) string
ObfuscateFQDN returns a obfuscated FQDN
func (*Obfuscation) ObfuscateFile ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateFile(filename string) error
func (*Obfuscation) ObfuscateIP ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateIP(ip string) string
ObfuscateIP returns a new IP but keep the first and last octets the same
func (*Obfuscation) ObfuscateInt ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateInt(data interface{}) int
ObfuscateInt uses the original value times the coefficient
func (*Obfuscation) ObfuscateNS ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateNS(ns string) string
ObfuscateNS returns a obfuscated namespace
func (*Obfuscation) ObfuscateNumber ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateNumber(data interface{}) float64
ObfuscateNumber uses the original value times the coefficient
func (*Obfuscation) ObfuscatePhoneNo ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscatePhoneNo(phoneNo string) string
ObfuscatePhoneNo returns a randome phone number with the same format
func (*Obfuscation) ObfuscateSSN ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateSSN(ssn string) string
ObfuscateSSN returns a obfuscated SSN
func (*Obfuscation) ObfuscateString ¶ added in v0.4.5
func (ptr *Obfuscation) ObfuscateString(value string) string
type OpStat ¶
type OpStat struct { AvgMilli float64 `json:"avg_ms" bson:"avg_ms"` // avg millisecond Count int `json:"count" bson:"count"` // number of ops Index string `json:"index" bson:"index"` // index used MaxMilli int `json:"max_ms" bson:"max_ms"` // max millisecond Namespace string `json:"ns" bson:"ns"` // database.collectin Op string `json:"op" bson:"op"` // count, delete, find, remove, and update QueryPattern string `json:"query_pattern" bson:"query_pattern"` // query pattern Reslen int `json:"total_reslen" bson:"total_reslen"` // total reslen TotalMilli int `json:"total_ms" bson:"total_ms"` // total milliseconds Marker int }
OpStat stores performance data
func AnalyzeLog ¶ added in v0.2.0
AnalyzeLog analyzes slow op log
func AnalyzeSlowOp ¶
AnalyzeSlowOp analyzes slow ops
type RemoteClient ¶ added in v0.3.1
type RemoteClient struct { Accepted int `json:"accepted" bson:"accepted"` Conns int `json:"conns" bson:"conns"` Ended int `json:"ended" bson:"ended"` IP string `json:"value" bson:"ip"` Port string `json:"port" bson:"port"` Driver string `bsno:"driver"` // driver name Version string `bsno:"version"` // driver version }
type S3Client ¶ added in v0.3.3
type S3Client struct {
// contains filtered or unexported fields
}
S3Client provides methods to interact with an S3 service.
func NewS3Client ¶ added in v0.3.3
func (*S3Client) CreateBucket ¶ added in v0.3.3
CreateBucket creates a new S3 bucket.
func (*S3Client) DeleteBucket ¶ added in v0.3.3
CreateBucket creates a new S3 bucket.
func (*S3Client) DeleteObject ¶ added in v0.3.3
DeleteObject deletes an object from S3.
type SQLite3DB ¶ added in v0.2.0
type SQLite3DB struct {
// contains filtered or unexported fields
}
func NewSQLite3DB ¶ added in v0.2.0
func (*SQLite3DB) CreateMetaData ¶ added in v0.3.1
func (*SQLite3DB) GetAcceptedConnsCounts ¶ added in v0.2.0
GetAcceptedConnsCounts returns opened connection counts
func (*SQLite3DB) GetAuditData ¶ added in v0.3.1
func (ptr *SQLite3DB) GetAuditData() (map[string][]NameValues, error)
func (*SQLite3DB) GetAverageOpTime ¶ added in v0.2.0
func (*SQLite3DB) GetConnectionStats ¶ added in v0.2.0
func (ptr *SQLite3DB) GetConnectionStats(chartType string, duration string) ([]RemoteClient, error)
GetConnectionStats returns stats data of accepted and ended
func (*SQLite3DB) GetHatchetInfo ¶ added in v0.2.0
func (ptr *SQLite3DB) GetHatchetInfo() HatchetInfo
func (*SQLite3DB) GetHatchetNames ¶ added in v0.2.0
func (*SQLite3DB) GetOpsCounts ¶ added in v0.2.0
GetOpsCounts returns opened connection counts
func (*SQLite3DB) GetReslenByIP ¶ added in v0.3.1
GetReslenByIP returns total response length by ip
func (*SQLite3DB) GetReslenByNamespace ¶ added in v0.3.1
GetReslenByNamespace returns total response length by ns
func (*SQLite3DB) GetSlowOps ¶ added in v0.2.0
func (*SQLite3DB) GetSlowestLogs ¶ added in v0.2.0
func (*SQLite3DB) GetVerbose ¶ added in v0.2.0
func (*SQLite3DB) InsertClientConn ¶ added in v0.2.0
func (*SQLite3DB) InsertDriver ¶ added in v0.3.1
func (*SQLite3DB) InsertFailedMessages ¶ added in v0.5.0
func (ptr *SQLite3DB) InsertFailedMessages(m *FailedMessages) error
func (*SQLite3DB) SearchLogs ¶ added in v0.2.0
func (*SQLite3DB) SetVerbose ¶ added in v0.2.0
func (*SQLite3DB) UpdateHatchetInfo ¶ added in v0.2.0
func (ptr *SQLite3DB) UpdateHatchetInfo(info HatchetInfo) error
Source Files ¶
- api_handler.go
- audit_template.go
- bios.go
- charts_handler.go
- charts_template.go
- database.go
- driver_handler.go
- drivers.go
- failed_messages.go
- handler.go
- hatchet.go
- http_reader.go
- images.go
- legacy.go
- logs_handler.go
- logs_template.go
- logv2.go
- mongo.go
- mongo_audit.go
- mongo_logs.go
- mongo_query.go
- obfuscation.go
- s3_client.go
- slowops.go
- sqlite3.go
- sqlite3_audit.go
- sqlite3_query.go
- stats_handler.go
- stats_template.go
- template.go
- utils.go