Documentation ¶
Index ¶
- Constants
- func ChartsHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func CheckUpgradeRecommendation(mongoVersion string) string
- func DataHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func FaviconHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func GetChartTemplate(chartType string) (*template.Template, error)
- func GetContentHTML() string
- func GetInfoTemplate() (*template.Template, error)
- func GetPieChartTemplate() (*template.Template, error)
- func GetTickets() *map[string]Tickets
- func Handler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func InfoHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func NamespaceChartHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func Run(fullVersion string)
- func ShardChartHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func Stringify(doc interface{}, opts ...string) string
- func StringifyIndent(doc interface{}) string
- func ToInt(num interface{}) int
- func ToInt64(num interface{}) int64
- type ActionLog
- type BalancerRound
- type ChangeLog
- type Chart
- type ChunkMoveError
- type ConfigChunk
- type ConfigCollection
- type ConfigDB
- type ConfigDatabase
- type ConfigMongos
- type ConfigShard
- type NameValue
- type Split
- type Tickets
Constants ¶
View Source
const ( MigrationTimeChartHTML = `` /* 1184-byte string literal not displayed */ MigrationStatsChartHTML = `` /* 1244-byte string literal not displayed */ ChunkSplitsChartHTML = `` /* 1144-byte string literal not displayed */ )
View Source
const ( T_MIGRATION_TIME = "migration_time" T_MIGRATION_STATS = "migration_stats" T_CHUNK_SPLITS = "splits" )
View Source
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 */ )
View Source
const ( // Summary SummaryHTML = `` /* 982-byte string literal not displayed */ // general info InfoHTML = `` /* 2084-byte string literal not displayed */ // logs LogsHTML = `` /* 918-byte string literal not displayed */ // chunkMove errors ChunkMoveErrorsHTML = `` /* 591-byte string literal not displayed */ // shards ShardsHTML = `` /* 1102-byte string literal not displayed */ // mongos MongosHTML = `` /* 1139-byte string literal not displayed */ // Databases DatabasesHTML = `` /* 629-byte string literal not displayed */ // Collections CollectionsHTML = `` /* 1030-byte string literal not displayed */ BondVideoHTML = `` /* 390-byte string literal not displayed */ )
View Source
const (
TOP_N = 23
)
Variables ¶
This section is empty.
Functions ¶
func ChartsHandler ¶
func ChartsHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
ChartsHandler renders charts for UI selections
func DataHandler ¶
func DataHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
DataHandler responds to API calls
func FaviconHandler ¶
func FaviconHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
func GetChartTemplate ¶
GetChartTemplate returns HTML
func GetContentHTML ¶
func GetContentHTML() string
func GetInfoTemplate ¶
GetInfoTemplate returns HTML
func GetPieChartTemplate ¶
func GetTickets ¶
GetTickets returns *map[string]Tickets instance
func Handler ¶
func Handler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
Handler responds to API calls
func InfoHandler ¶
func InfoHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
InfoHandler responds to API calls
func NamespaceChartHandler ¶
func NamespaceChartHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
NamespaceChartHandler renders pie charts for percentage of shards distribution for a given collection
func ShardChartHandler ¶
func ShardChartHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
ShardChartHandler renders pie charts for percentage of collections distribution for a given shard
func StringifyIndent ¶
func StringifyIndent(doc interface{}) string
Types ¶
type ActionLog ¶
type ActionLog struct { BalancerRounds []BalancerRound Stats struct { AverageExecutionTime float64 `bson:"averageExecutionTime"` Capped *bool `bson:"capped"` MaxExecutionTime int64 `bson:"maxExecutionTime"` MaxSize int64 `bson:"maxSize"` TotalChunksMoved int `bson:"totalChunksMoved"` TotalErrors int `bson:"totalErrors"` } // contains filtered or unexported fields }
func (*ActionLog) GetBalancerRounds ¶
type BalancerRound ¶
type ChangeLog ¶
type ChangeLog struct { ChunkMoveErrors []ChunkMoveError `bson:"chunkMoveErrors"` Splits []Split `bson:"splits"` Stats struct { Capped *bool `bson:"capped"` MaxSize int64 `bson:"maxSize"` TotalChunkMoveErrors int `bson:"totalChunkMoveErrors"` TotalSplits int `bson:"totalSplits"` } `bson:"stats"` // contains filtered or unexported fields }
func (*ChangeLog) GetMoveChunkErrors ¶
type ChunkMoveError ¶
type ConfigChunk ¶
type ConfigCollection ¶
type ConfigDB ¶
type ConfigDB struct { MongoVersion string `bson:"version"` Version struct { ClusterID *primitive.ObjectID `bson:"clusterId"` CurrentVersion *int `bson:"currentVersion"` ID *int `bson:"_id"` MinCompatibleVersion *int `bson:"minCompatibleVersion"` } `bson:"config.version"` Mongos []ConfigMongos `bson:"config.mongos"` ShardsMap map[string]ConfigShard `bson:"shards"` Databases []ConfigDatabase `bson:"config.databases"` CollectionsMap map[string]ConfigCollection `bson:"collections"` Chunks []ConfigChunk `bson:"config.chunks"` Actions *ActionLog `bson:"actions"` Changes *ChangeLog `bson:"changes"` LastPing *primitive.DateTime `bson:"lastPing"` Warnings []string `bson:"warnings"` IsUpgrade bool IsUserVersion bool MajorVersion string // contains filtered or unexported fields }
func (*ConfigDB) CheckWarnings ¶
CheckWarnings checks any misconfigrations and anomalies
func (*ConfigDB) GetChunksInfo ¶
func (*ConfigDB) GetShardingInfo ¶
type ConfigDatabase ¶
type ConfigMongos ¶
type ConfigShard ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.