record

package
v0.0.0-...-43c0f45 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package util provides general assistance to the parser and other areas of code. The package is entirely self contained and should not reference anything not already contained in the standard go release.

Index

Constants

View Source
const (
	ComponentNone   Component = 0
	ComponentAccess           = 1 << iota
	ComponentAccessControl
	ComponentASIO
	ComponentBridge
	ComponentCommand
	ComponentConnPool
	ComponentControl
	ComponentDefault
	ComponentElection
	ComponentExecutor
	ComponentFTDC
	ComponentGeo
	ComponentHeartbeats
	ComponentIndex
	ComponentInitialSync
	ComponentJournal
	ComponentNetwork
	ComponentQuery
	ComponentRecovery
	ComponentRepl
	ComponentReplication
	ComponentReplHB
	ComponentRollback
	ComponentSharding
	ComponentShardingRefr
	ComponentStorage
	ComponentTotal
	ComponentTracking
	ComponentWrite
	ComponentUnknown
)
View Source
const (
	SeverityNone Severity = 0
	SeverityD             = 1 << iota // Debug
	SeverityD1                        // Debug 1
	SeverityD2                        // Debug 2
	SeverityD3                        // Debug 3
	SeverityD4                        // Debug 4
	SeverityD5                        // Debug 5
	SeverityE                         // Error
	SeverityF                         // Severe/Fatal
	SeverityI                         // Information/Log
	SeverityW                         // Warning
)

Variables

View Source
var COUNTERS = map[string]string{
	"cursorExhausted":  "cursorExhausted",
	"cursorid":         "cursorid",
	"docsExamined":     "docsExamined",
	"fastmod":          "fastmod",
	"fastmodinsert":    "fastmodinsert",
	"exhaust":          "exhaust",
	"fromMultiPlanner": "fromMultiPlanner",
	"hasSortStage":     "hasSortStage",
	"idhack":           "idhack",
	"keysDeleted":      "keysDeleted",
	"keysExamined":     "keysExamined",
	"keysInserted":     "keysInserted",
	"ndeleted":         "ndeleted",
	"nDeleted":         "ndeleted",
	"ninserted":        "ninserted",
	"nInserted":        "ninserted",
	"nmatched":         "nmatched",
	"nMatched":         "nmatched",
	"nmodified":        "nmodified",
	"nModified":        "nmodified",
	"nmoved":           "nmoved",
	"nscanned":         "keysExamined",
	"nscannedObjects":  "docsExamined",
	"nreturned":        "nreturned",
	"ntoreturn":        "ntoreturn",
	"ntoskip":          "notoskip",
	"planSummary":      "planSummary",
	"numYields":        "numYields",
	"keyUpdates":       "keyUpdates",
	"replanned":        "replanned",
	"reslen":           "reslen",
	"scanAndOrder":     "scanAndOrder",
	"upsert":           "upsert",
	"writeConflicts":   "writeConflicts",
}

ref: /mongo/src/mongo/db/curop.cpp

View Source
var OPERATIONS = []string{
	"aggregate",
	"command",
	"count",
	"distinct",
	"find",
	"geoNear",
	"geonear",
	"getMore",
	"getmore",
	"insert",
	"mapreduce",
	"query",
	"remove",
	"update",
}
View Source
var OPERATORS_COMPARISON = []string{
	"$all",
	"$bitsAllClear",
	"$bitsAllSet",
	"$bitsAnyClear",
	"$bitsAnySet",
	"$eq",
	"$exists",
	"$gt",
	"$gte",
	"$in",
	"$lt",
	"$lte",
	"$ne",
	"$size",
	"$type",
}
View Source
var OPERATORS_EXPRESSION = []string{
	"$box",
	"$center",
	"$centerSphere",
	"$comment",
	"$elemMatch",
	"$expr",
	"$geoIntersects",
	"$geoWithin",
	"$geometry",
	"$jsonSchema",
	"$mod",
	"$near",
	"$nearSphere",
	"$regex",
	"$text",
	"$where",
}
View Source
var OPERATORS_LOGICAL = []string{
	"$and",
	"$nin",
	"$nor",
	"$not",
	"$or",
}

Functions

func IsContext

func IsContext(value string) bool

IsContext checks for a bracketed string ([<string>])

Types

type Base

type Base struct {
	*internal.RuneReader

	Component  Component
	CString    bool
	LineNumber uint
	RawDate    string
	RawContext string
	RawMessage string
	Severity   Severity
}

type Binary

type Binary uint32
const (
	BinaryAny Binary = iota
	BinaryMongod
	BinaryMongos
)

func (Binary) String

func (b Binary) String() string

type Component

type Component int

func NewComponent

func NewComponent(s string) (Component, bool)

func (Component) String

func (c Component) String() string

type Entry

type Entry struct {
	Base
	Message message.Message

	Connection      int
	Context         string
	Date            time.Time
	Format          internal.DateFormat
	DateYearMissing bool
	DateRollover    int
	DateValid       bool
	Thread          int

	Valid bool
}

func (*Entry) String

func (r *Entry) String() string

type Severity

type Severity int

func NewSeverity

func NewSeverity(s string) (Severity, bool)

func (Severity) String

func (s Severity) String() string

Jump to

Keyboard shortcuts

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