Documentation ¶
Index ¶
- Constants
- func NewApplicationMySQLRepo(operationInfo healthcheck.OperationInfo, conn *mysql.Conn) healthcheck.ApplicationMySQLRepo
- func NewDASRepo(db middleware.Pool) healthcheck.DASRepo
- func NewDASRepoWithGlobal() healthcheck.DASRepo
- func NewDefaultEngine(operationInfo healthcheck.OperationInfo, dasRepo healthcheck.DASRepo, ...) healthcheck.Engine
- func NewDefaultItemConfig(itemName string, itemWeight int, lowWatermark float64, highWatermark float64, ...) healthcheck.ItemConfig
- func NewEmptyDefaultEngineConfig() healthcheck.EngineConfig
- func NewEmptyDefaultItemConfig() healthcheck.ItemConfig
- func NewEmptyOperationHistory() healthcheck.OperationHistory
- func NewEmptyPrometheusData() healthcheck.PrometheusData
- func NewEmptyTable() healthcheck.Table
- func NewFileSystem(mountPoint, device string) healthcheck.FileSystem
- func NewOperationHistory(id, mySQLServerID int, hostIP string, portNum int, ...) healthcheck.OperationHistory
- func NewOperationInfo(operationID int, user metadata.User, apps []metadata.App, ...) healthcheck.OperationInfo
- func NewPrometheusData(ts string, value float64) healthcheck.PrometheusData
- func NewService(repo healthcheck.DASRepo) healthcheck.Service
- func NewServiceWithDefault() healthcheck.Service
- func NewTable(db, name string, rows int, size float64) healthcheck.Table
- type ApplicationMySQLRepo
- func (amr *ApplicationMySQLRepo) Close() error
- func (amr *ApplicationMySQLRepo) GetDBName(tableNames []string) (string, error)
- func (amr *ApplicationMySQLRepo) GetLargeTables() ([]healthcheck.Table, error)
- func (amr *ApplicationMySQLRepo) GetMySQLDirs() ([]string, error)
- func (amr *ApplicationMySQLRepo) GetOperationInfo() healthcheck.OperationInfo
- func (amr *ApplicationMySQLRepo) GetVariables(items []string) ([]healthcheck.Variable, error)
- type ClickhouseQueryRepo
- type DASRepo
- func (dr *DASRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
- func (dr *DASRepo) GetHealthCheckHistories(mysqlServerIDList []int, limit int) ([]healthcheck.OperationHistory, error)
- func (dr *DASRepo) GetResultByOperationID(operationID int) (healthcheck.Result, error)
- func (dr *DASRepo) InitOperation(userID, mysqlServerID int, startTime, endTime time.Time, step time.Duration) (int, error)
- func (dr *DASRepo) IsRunning(mysqlServerID int) (bool, error)
- func (dr *DASRepo) LoadEngineConfig() (healthcheck.EngineConfig, error)
- func (dr *DASRepo) SaveResult(result healthcheck.Result) error
- func (dr *DASRepo) Transaction() (middleware.Transaction, error)
- func (dr *DASRepo) UpdateAccuracyReviewByOperationID(operationID int, review int) error
- func (dr *DASRepo) UpdateOperationStatus(operationID int, status int, message string) error
- type DefaultEngine
- type DefaultEngineConfig
- type DefaultItemConfig
- func (dic *DefaultItemConfig) GetCreateTime() time.Time
- func (dic *DefaultItemConfig) GetDelFlag() int
- func (dic *DefaultItemConfig) GetHighWatermark() float64
- func (dic *DefaultItemConfig) GetID() int
- func (dic *DefaultItemConfig) GetItemName() string
- func (dic *DefaultItemConfig) GetItemWeight() int
- func (dic *DefaultItemConfig) GetLastUpdateTime() time.Time
- func (dic *DefaultItemConfig) GetLowWatermark() float64
- func (dic *DefaultItemConfig) GetMaxScoreDeductionHigh() float64
- func (dic *DefaultItemConfig) GetMaxScoreDeductionMedium() float64
- func (dic *DefaultItemConfig) GetScoreDeductionPerUnitHigh() float64
- func (dic *DefaultItemConfig) GetScoreDeductionPerUnitMedium() float64
- func (dic *DefaultItemConfig) GetUnit() float64
- type FileSystem
- type GlobalVariable
- type MySQLQueryRepo
- type OperationHistory
- func (oh *OperationHistory) GetAccountName() string
- func (oh *OperationHistory) GetCreateTime() time.Time
- func (oh *OperationHistory) GetDelFlag() int
- func (oh *OperationHistory) GetEndTime() time.Time
- func (oh *OperationHistory) GetHostIP() string
- func (oh *OperationHistory) GetID() int
- func (oh *OperationHistory) GetLastUpdateTime() time.Time
- func (oh *OperationHistory) GetMessage() string
- func (oh *OperationHistory) GetMySQLServerID() int
- func (oh *OperationHistory) GetPortNum() int
- func (oh *OperationHistory) GetStartTime() time.Time
- func (oh *OperationHistory) GetStatus() int
- func (oh *OperationHistory) GetStep() int
- func (oh *OperationHistory) GetUserID() int
- type OperationInfo
- func (oi *OperationInfo) GetAppName() string
- func (oi *OperationInfo) GetApps() []metadata.App
- func (oi *OperationInfo) GetEndTime() time.Time
- func (oi *OperationInfo) GetMonitorSystem() metadata.MonitorSystem
- func (oi *OperationInfo) GetMySQLServer() metadata.MySQLServer
- func (oi *OperationInfo) GetOperationID() int
- func (oi *OperationInfo) GetStartTime() time.Time
- func (oi *OperationInfo) GetStep() time.Duration
- func (oi *OperationInfo) GetUser() metadata.User
- type PrometheusData
- type PrometheusRepo
- func (pr *PrometheusRepo) GetAverageActiveSessionPercents() ([]healthcheck.PrometheusData, error)
- func (pr *PrometheusRepo) GetAvgBackupFailedRatio() ([]healthcheck.PrometheusData, error)
- func (pr *PrometheusRepo) GetCPUUsage() ([]healthcheck.PrometheusData, error)
- func (pr *PrometheusRepo) GetCacheMissRatio() ([]healthcheck.PrometheusData, error)
- func (pr *PrometheusRepo) GetConnectionUsage() ([]healthcheck.PrometheusData, error)
- func (pr *PrometheusRepo) GetDiskCapacityUsage(mountPoints []string) ([]healthcheck.PrometheusData, error)
- func (pr *PrometheusRepo) GetFileSystems() ([]healthcheck.FileSystem, error)
- func (pr *PrometheusRepo) GetIOUtil() ([]healthcheck.PrometheusData, error)
- func (pr *PrometheusRepo) GetOperationInfo() healthcheck.OperationInfo
- func (pr *PrometheusRepo) GetStatisticFailedRatio() ([]healthcheck.PrometheusData, error)
- type Result
- func NewEmptyResult() *Result
- func NewEmptyResultWithGlobal() *Result
- func NewEmptyResultWithOperationIDAndHostInfo(operationID int, hostIP string, portNum int) *Result
- func NewEmptyResultWithRepo(repository healthcheck.DASRepo) *Result
- func NewResult(repo healthcheck.DASRepo, operationID int, hostIP string, portNum int, ...) *Result
- func NewResultWithDefault(operationID int, hostIP string, portNum int, weightedAverageScore int, ...) *Result
- func (r *Result) GetAccuracyReview() int
- func (r *Result) GetAverageActiveSessionPercentsData() string
- func (r *Result) GetAverageActiveSessionPercentsHigh() string
- func (r *Result) GetAverageActiveSessionPercentsScore() int
- func (r *Result) GetAvgBackupFailedRatioData() string
- func (r *Result) GetAvgBackupFailedRatioHigh() string
- func (r *Result) GetAvgBackupFailedRatioScore() int
- func (r *Result) GetCPUUsageData() string
- func (r *Result) GetCPUUsageHigh() string
- func (r *Result) GetCPUUsageScore() int
- func (r *Result) GetCacheMissRatioData() string
- func (r *Result) GetCacheMissRatioHigh() string
- func (r *Result) GetCacheMissRatioScore() int
- func (r *Result) GetConnectionUsageData() string
- func (r *Result) GetConnectionUsageHigh() string
- func (r *Result) GetConnectionUsageScore() int
- func (r *Result) GetCreateTime() time.Time
- func (r *Result) GetDBConfigAdvice() string
- func (r *Result) GetDBConfigData() string
- func (r *Result) GetDBConfigScore() int
- func (r *Result) GetDelFlag() int
- func (r *Result) GetDiskCapacityUsageData() string
- func (r *Result) GetDiskCapacityUsageHigh() string
- func (r *Result) GetDiskCapacityUsageScore() int
- func (r *Result) GetHostIP() string
- func (r *Result) GetIOUtilData() string
- func (r *Result) GetIOUtilHigh() string
- func (r *Result) GetIOUtilScore() int
- func (r *Result) GetLastUpdateTime() time.Time
- func (r *Result) GetOperationID() int
- func (r *Result) GetPortNum() int
- func (r *Result) GetSlowQueryAdvice() string
- func (r *Result) GetSlowQueryData() string
- func (r *Result) GetSlowQueryScore() int
- func (r *Result) GetStatisticFailedRatioData() string
- func (r *Result) GetStatisticFailedRatioHigh() string
- func (r *Result) GetStatisticFailedRatioScore() int
- func (r *Result) GetTableRowsData() string
- func (r *Result) GetTableRowsHigh() string
- func (r *Result) GetTableRowsScore() int
- func (r *Result) GetTableSizeData() string
- func (r *Result) GetTableSizeHigh() string
- func (r *Result) GetTableSizeScore() int
- func (r *Result) GetWeightedAverageScore() int
- func (r *Result) Identity() int
- func (r *Result) MarshalJSON() ([]byte, error)
- func (r *Result) MarshalJSONWithFields(fields ...string) ([]byte, error)
- func (r *Result) Set(fields map[string]interface{}) error
- func (r *Result) String() string
- type Service
- func (s *Service) Check(mysqlServerID int, startTime, endTime time.Time, step time.Duration, ...) (int, error)
- func (s *Service) CheckByHostInfo(hostIP string, portNum int, startTime, endTime time.Time, step time.Duration, ...) (int, error)
- func (s *Service) GetDASRepo() healthcheck.DASRepo
- func (s *Service) GetEngine() healthcheck.Engine
- func (s *Service) GetOperationHistories() []healthcheck.OperationHistory
- func (s *Service) GetOperationHistoriesByLoginName(loginName string) error
- func (s *Service) GetOperationInfo() healthcheck.OperationInfo
- func (s *Service) GetResult() healthcheck.Result
- func (s *Service) GetResultByOperationID(id int) error
- func (s *Service) Marshal() ([]byte, error)
- func (s *Service) MarshalWithFields(fields ...string) ([]byte, error)
- func (s *Service) ReviewAccuracy(id, review int) error
- type Table
- type Variable
Constants ¶
const ( // Prometheus API PrometheusAvgBackupFailedRatioV1 = `` /* 366-byte string literal not displayed */ PrometheusAvgBackupFailedRatioV2 = `` /* 374-byte string literal not displayed */ PrometheusStatisticFailedRatioV1 = ` 1-(sum(mysqlupdbstat{instance=~"%s",type="dbupstatus"})/count(mysqlupdbstat{instance=~"%s",type="dbupstatus"})) ` PrometheusStatisticFailedRatioV2 = ` 1-(sum(mysqlupdbstat{node_name=~"%s",type="dbupstatus"})/count(mysqlupdbstat{node_name=~"%s",type="dbupstatus"})) ` PrometheusCPUUsageV1 = `` /* 582-byte string literal not displayed */ PrometheusCPUUsageV2 = `` /* 620-byte string literal not displayed */ PrometheusFileSystemV1 = ` node_filesystem_files{instance=~"%s",fstype!~"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs"} ` PrometheusFileSystemV2 = ` node_filesystem_files{node_name=~"%s",fstype!~"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs"} ` PrometheusIOUtilV1 = `` /* 138-byte string literal not displayed */ PrometheusIOUtilV2 = `` /* 292-byte string literal not displayed */ PrometheusDiskCapacityV1 = `` /* 233-byte string literal not displayed */ PrometheusDiskCapacityV2 = `` /* 603-byte string literal not displayed */ PrometheusConnectionUsageV1 = `` /* 367-byte string literal not displayed */ PrometheusConnectionUsageV2 = `` /* 386-byte string literal not displayed */ PrometheusAverageActiveSessionPercentsV1 = `` /* 350-byte string literal not displayed */ PrometheusAverageActiveSessionPercentsV2 = `` /* 374-byte string literal not displayed */ PrometheusCacheMissRatioV1 = `` /* 347-byte string literal not displayed */ PrometheusCacheMissRatioV2 = `` /* 367-byte string literal not displayed */ // query MonitorMySQLQuery = `` /* 980-byte string literal not displayed */ MonitorClickhouseQuery = `` /* 1250-byte string literal not displayed */ )
const (
SlowQueryNumLimit = 100
)
Variables ¶
This section is empty.
Functions ¶
func NewApplicationMySQLRepo ¶ added in v1.1.0
func NewApplicationMySQLRepo(operationInfo healthcheck.OperationInfo, conn *mysql.Conn) healthcheck.ApplicationMySQLRepo
NewApplicationMySQLRepo returns a new healthcheck.ApplicationMySQLRepo
func NewDASRepo ¶ added in v1.1.0
func NewDASRepo(db middleware.Pool) healthcheck.DASRepo
NewDASRepo returns healthcheck.DASRepo with given middleware.Pool
func NewDASRepoWithGlobal ¶ added in v1.1.0
func NewDASRepoWithGlobal() healthcheck.DASRepo
NewDASRepoWithGlobal returns healthcheck.DASRepo with global mysql pool
func NewDefaultEngine ¶
func NewDefaultEngine(operationInfo healthcheck.OperationInfo, dasRepo healthcheck.DASRepo, applicationMySQLRepo healthcheck.ApplicationMySQLRepo, prometheusRepo healthcheck.PrometheusRepo, queryRepo healthcheck.QueryRepo) healthcheck.Engine
NewDefaultEngine returns a new healthcheck.DefaultEngine
func NewDefaultItemConfig ¶
func NewDefaultItemConfig(itemName string, itemWeight int, lowWatermark float64, highWatermark float64, unit float64, scoreDeductionPerUnitHigh float64, maxScoreDeductionHigh float64, scoreDeductionPerUnitMedium float64, maxScoreDeductionMedium float64) healthcheck.ItemConfig
NewDefaultItemConfig returns new healthcheck.ItemConfig
func NewEmptyDefaultEngineConfig ¶
func NewEmptyDefaultEngineConfig() healthcheck.EngineConfig
NewEmptyDefaultEngineConfig returns a new empty DefaultItemConfig
func NewEmptyDefaultItemConfig ¶
func NewEmptyDefaultItemConfig() healthcheck.ItemConfig
NewEmptyDefaultItemConfig returns a new healthcheck.DefaultItemConfig with empty value
func NewEmptyOperationHistory ¶ added in v1.1.1
func NewEmptyOperationHistory() healthcheck.OperationHistory
NewEmptyOperationHistory returns healthcheck.OperationHistory with empty value
func NewEmptyPrometheusData ¶ added in v1.1.0
func NewEmptyPrometheusData() healthcheck.PrometheusData
func NewEmptyTable ¶ added in v1.1.0
func NewEmptyTable() healthcheck.Table
func NewFileSystem ¶ added in v1.1.0
func NewFileSystem(mountPoint, device string) healthcheck.FileSystem
func NewOperationHistory ¶ added in v1.1.1
func NewOperationHistory(id, mySQLServerID int, hostIP string, portNum int, startTime, endTime time.Time, step, status int, message string, delFlag int, createTime, lastUpdateTime time.Time) healthcheck.OperationHistory
NewOperationHistory returns healthcheck.OperationHistory
func NewOperationInfo ¶
func NewOperationInfo(operationID int, user metadata.User, apps []metadata.App, mysqlServer metadata.MySQLServer, MonitorSystem metadata.MonitorSystem, startTime, endTime time.Time, step time.Duration) healthcheck.OperationInfo
NewOperationInfo returns a new healthcheck.OperationInfo
func NewPrometheusData ¶ added in v1.1.0
func NewPrometheusData(ts string, value float64) healthcheck.PrometheusData
func NewService ¶
func NewService(repo healthcheck.DASRepo) healthcheck.Service
NewService returns a new *Service
func NewServiceWithDefault ¶
func NewServiceWithDefault() healthcheck.Service
NewServiceWithDefault returns a new healthcheck.Service with default repository
Types ¶
type ApplicationMySQLRepo ¶ added in v1.1.0
type ApplicationMySQLRepo struct {
// contains filtered or unexported fields
}
func (*ApplicationMySQLRepo) Close ¶ added in v1.1.0
func (amr *ApplicationMySQLRepo) Close() error
Close closes the application mysql connection
func (*ApplicationMySQLRepo) GetDBName ¶ added in v1.1.0
func (amr *ApplicationMySQLRepo) GetDBName(tableNames []string) (string, error)
GetDBName gets the db name of given table names
func (*ApplicationMySQLRepo) GetLargeTables ¶ added in v1.1.0
func (amr *ApplicationMySQLRepo) GetLargeTables() ([]healthcheck.Table, error)
GetLargeTables gets the large tables
func (*ApplicationMySQLRepo) GetMySQLDirs ¶ added in v1.1.0
func (amr *ApplicationMySQLRepo) GetMySQLDirs() ([]string, error)
GetMySQLDirs gets the mysql directories
func (*ApplicationMySQLRepo) GetOperationInfo ¶ added in v1.1.0
func (amr *ApplicationMySQLRepo) GetOperationInfo() healthcheck.OperationInfo
GetOperationInfo returns the operation information
func (*ApplicationMySQLRepo) GetVariables ¶ added in v1.1.0
func (amr *ApplicationMySQLRepo) GetVariables(items []string) ([]healthcheck.Variable, error)
GetVariables gets db config with given items
type ClickhouseQueryRepo ¶ added in v1.1.0
type ClickhouseQueryRepo struct {
// contains filtered or unexported fields
}
func NewClickhouseQueryRepo ¶ added in v1.1.0
func NewClickhouseQueryRepo(operationInfo healthcheck.OperationInfo, conn *clickhouse.Conn) *ClickhouseQueryRepo
NewClickhouseQueryRepo returns the new *ClickhouseQueryRepo
func (*ClickhouseQueryRepo) Close ¶ added in v1.1.0
func (cqr *ClickhouseQueryRepo) Close() error
Close closes the connection
func (*ClickhouseQueryRepo) GetOperationInfo ¶ added in v1.1.0
func (cqr *ClickhouseQueryRepo) GetOperationInfo() healthcheck.OperationInfo
GetOperationInfo returns the operation information
func (*ClickhouseQueryRepo) GetSlowQuery ¶ added in v1.1.0
func (cqr *ClickhouseQueryRepo) GetSlowQuery() ([]depquery.Query, error)
GetSlowQuery gets the slow query
type DASRepo ¶ added in v1.1.0
type DASRepo struct {
Database middleware.Pool
}
DASRepo for health check
func (*DASRepo) Execute ¶ added in v1.1.0
func (dr *DASRepo) Execute(command string, args ...interface{}) (middleware.Result, error)
Execute executes given command and placeholders on the middleware
func (*DASRepo) GetHealthCheckHistories ¶ added in v1.1.1
func (dr *DASRepo) GetHealthCheckHistories(mysqlServerIDList []int, limit int) ([]healthcheck.OperationHistory, error)
GetOperationHistories gets operation histories from the middleware
func (*DASRepo) GetResultByOperationID ¶ added in v1.1.0
func (dr *DASRepo) GetResultByOperationID(operationID int) (healthcheck.Result, error)
GetResultByOperationID gets a Result by the operationID from the middleware
func (*DASRepo) InitOperation ¶ added in v1.1.0
func (dr *DASRepo) InitOperation(userID, mysqlServerID int, startTime, endTime time.Time, step time.Duration) (int, error)
InitOperation creates a testOperationInfo in the middleware
func (*DASRepo) IsRunning ¶ added in v1.1.0
IsRunning gets status by the mysqlServerID from the middleware
func (*DASRepo) LoadEngineConfig ¶ added in v1.1.0
func (dr *DASRepo) LoadEngineConfig() (healthcheck.EngineConfig, error)
LoadEngineConfig loads engine config from the middleware
func (*DASRepo) SaveResult ¶ added in v1.1.0
func (dr *DASRepo) SaveResult(result healthcheck.Result) error
SaveResult saves the result in the middleware
func (*DASRepo) Transaction ¶ added in v1.1.0
func (dr *DASRepo) Transaction() (middleware.Transaction, error)
Transaction returns a middleware.Transaction that could execute multiple commands as a transaction
func (*DASRepo) UpdateAccuracyReviewByOperationID ¶ added in v1.1.0
UpdateAccuracyReviewByOperationID updates the accuracyReview by the operationID in the middleware
type DefaultEngine ¶
type DefaultEngine struct {
// contains filtered or unexported fields
}
DefaultEngine work for health check module
func (*DefaultEngine) CheckAvgBackupFailedRatio ¶ added in v1.1.0
func (de *DefaultEngine) CheckAvgBackupFailedRatio() error
CheckAvgBackupFailedRatio checks the mysql backup information
func (*DefaultEngine) CheckStatisticFailedRatio ¶ added in v1.1.0
func (de *DefaultEngine) CheckStatisticFailedRatio() error
CheckStatisticFailedRatio checks the statistic of mysql
func (*DefaultEngine) GetOperationInfo ¶ added in v1.1.0
func (de *DefaultEngine) GetOperationInfo() healthcheck.OperationInfo
GetOperationInfo returns the operation information
type DefaultEngineConfig ¶
type DefaultEngineConfig map[string]healthcheck.ItemConfig
DefaultEngineConfig is a map of DefaultItemConfig
func (DefaultEngineConfig) GetItemConfig ¶ added in v1.1.0
func (dec DefaultEngineConfig) GetItemConfig(item string) healthcheck.ItemConfig
GetItemConfig returns healthcheck.ItemConfig with given item name
func (DefaultEngineConfig) SetItemConfig ¶ added in v1.1.1
func (dec DefaultEngineConfig) SetItemConfig(item string, config healthcheck.ItemConfig)
SetItemConfig sets item config with given item and config
func (DefaultEngineConfig) Validate ¶
func (dec DefaultEngineConfig) Validate() error
Validate validates if engine configuration is valid
type DefaultItemConfig ¶
type DefaultItemConfig struct { ID int `middleware:"id" json:"id"` ItemName string `middleware:"item_name" json:"item_name"` ItemWeight int `middleware:"item_weight" json:"item_weight"` LowWatermark float64 `middleware:"low_watermark" json:"low_watermark"` HighWatermark float64 `middleware:"high_watermark" json:"high_watermark"` Unit float64 `middleware:"unit" json:"unit"` ScoreDeductionPerUnitHigh float64 `middleware:"score_deduction_per_unit_high" json:"score_deduction_per_unit_high"` MaxScoreDeductionHigh float64 `middleware:"max_score_deduction_high" json:"max_score_deduction_high"` ScoreDeductionPerUnitMedium float64 `middleware:"score_deduction_per_unit_medium" json:"score_deduction_per_unit_medium"` MaxScoreDeductionMedium float64 `middleware:"max_score_deduction_medium" json:"max_score_deduction_medium"` DelFlag int `middleware:"del_flag" json:"del_flag"` CreateTime time.Time `middleware:"create_time" json:"create_time"` LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"` }
DefaultItemConfig include all data for a item
func (*DefaultItemConfig) GetCreateTime ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetCreateTime() time.Time
GetCreateTime returns the create time
func (*DefaultItemConfig) GetDelFlag ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetDelFlag() int
GetDelFlag returns the delete flag
func (*DefaultItemConfig) GetHighWatermark ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetHighWatermark() float64
GetHighWatermark returns the high watermark
func (*DefaultItemConfig) GetID ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetID() int
GetID returns the identity
func (*DefaultItemConfig) GetItemName ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetItemName() string
GetItemName returns the item name
func (*DefaultItemConfig) GetItemWeight ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetItemWeight() int
GetItemWeight returns the item weight
func (*DefaultItemConfig) GetLastUpdateTime ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetLastUpdateTime() time.Time
GetLastUpdateTime returns the last update time
func (*DefaultItemConfig) GetLowWatermark ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetLowWatermark() float64
GetLowWatermark returns the low watermark
func (*DefaultItemConfig) GetMaxScoreDeductionHigh ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetMaxScoreDeductionHigh() float64
GetMaxScoreDeductionHigh returns the max score deduction high
func (*DefaultItemConfig) GetMaxScoreDeductionMedium ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetMaxScoreDeductionMedium() float64
GetMaxScoreDeductionMedium returns the max score deduction medium
func (*DefaultItemConfig) GetScoreDeductionPerUnitHigh ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetScoreDeductionPerUnitHigh() float64
GetScoreDeductionPerUnitHigh returns the score deduction per unit high
func (*DefaultItemConfig) GetScoreDeductionPerUnitMedium ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetScoreDeductionPerUnitMedium() float64
GetScoreDeductionPerUnitMedium returns the score deduction per unit medium
func (*DefaultItemConfig) GetUnit ¶ added in v1.1.0
func (dic *DefaultItemConfig) GetUnit() float64
GetUnit returns the unit
type FileSystem ¶ added in v1.1.0
type FileSystem struct { MountPoint string `middleware:"mount_point" json:"mount_point"` Device string `middleware:"device" json:"device"` }
func (*FileSystem) GetDevice ¶ added in v1.1.0
func (fs *FileSystem) GetDevice() string
func (*FileSystem) GetMountPoint ¶ added in v1.1.0
func (fs *FileSystem) GetMountPoint() string
type GlobalVariable ¶
type GlobalVariable struct { VariableName string `middleware:"variable_name" json:"variable_name"` VariableValue string `middleware:"variable_value" json:"variable_value"` }
GlobalVariable encapsulates k-v pairs for global variable
func NewEmptyGlobalVariable ¶
func NewEmptyGlobalVariable() *GlobalVariable
NewEmptyGlobalVariable returns a new *GlobalVariables
func NewGlobalVariable ¶
func NewGlobalVariable(name, value string) *GlobalVariable
NewGlobalVariable returns a *GlobalVariable
func (*GlobalVariable) GetName ¶ added in v1.1.0
func (gv *GlobalVariable) GetName() string
func (*GlobalVariable) GetValue ¶ added in v1.1.0
func (gv *GlobalVariable) GetValue() string
type MySQLQueryRepo ¶ added in v1.1.0
type MySQLQueryRepo struct {
// contains filtered or unexported fields
}
func NewMySQLQueryRepo ¶ added in v1.1.0
func NewMySQLQueryRepo(operationInfo healthcheck.OperationInfo, conn *mysql.Conn) *MySQLQueryRepo
NewMySQLQueryRepo returns the new *MySQLQueryRepo
func (*MySQLQueryRepo) Close ¶ added in v1.1.0
func (mqr *MySQLQueryRepo) Close() error
Close closes the connection
func (*MySQLQueryRepo) GetOperationInfo ¶ added in v1.1.0
func (mqr *MySQLQueryRepo) GetOperationInfo() healthcheck.OperationInfo
GetOperationInfo returns the operation information
func (*MySQLQueryRepo) GetSlowQuery ¶ added in v1.1.0
func (mqr *MySQLQueryRepo) GetSlowQuery() ([]depquery.Query, error)
GetSlowQuery gets the slow query
type OperationHistory ¶ added in v1.1.1
type OperationHistory struct { ID int `middleware:"id" json:"id"` UserID int `middleware:"user_id" json:"user_id"` AccountName string `middleware:"account_name" json:"account_name"` MySQLServerID int `middleware:"mysql_server_id" json:"mysql_server_id"` HostIP string `middleware:"host_ip" json:"host_ip"` PortNum int `middleware:"port_num" json:"port_num"` StartTime time.Time `middleware:"start_time" json:"start_time"` EndTime time.Time `middleware:"end_time" json:"end_time"` Step int `middleware:"step" json:"step"` Status int `middleware:"status" json:"status"` Message string `middleware:"message" json:"message"` DelFlag int `middleware:"del_flag" json:"del_flag"` CreateTime time.Time `middleware:"create_time" json:"create_time"` LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"` }
func (*OperationHistory) GetAccountName ¶ added in v1.1.1
func (oh *OperationHistory) GetAccountName() string
GetAccountName returns the user account name
func (*OperationHistory) GetCreateTime ¶ added in v1.1.1
func (oh *OperationHistory) GetCreateTime() time.Time
GetCreateTime returns the create time
func (*OperationHistory) GetDelFlag ¶ added in v1.1.1
func (oh *OperationHistory) GetDelFlag() int
GetDelFlag returns the delete flag
func (*OperationHistory) GetEndTime ¶ added in v1.1.1
func (oh *OperationHistory) GetEndTime() time.Time
GetEndTime returns the end time
func (*OperationHistory) GetHostIP ¶ added in v1.1.1
func (oh *OperationHistory) GetHostIP() string
GetHostIP returns the host ip of mysql server
func (*OperationHistory) GetID ¶ added in v1.1.1
func (oh *OperationHistory) GetID() int
GetID returns the identity
func (*OperationHistory) GetLastUpdateTime ¶ added in v1.1.1
func (oh *OperationHistory) GetLastUpdateTime() time.Time
GetLastUpdateTime returns the last update time
func (*OperationHistory) GetMessage ¶ added in v1.1.1
func (oh *OperationHistory) GetMessage() string
GetMessage returns the message
func (*OperationHistory) GetMySQLServerID ¶ added in v1.1.1
func (oh *OperationHistory) GetMySQLServerID() int
GetMySQLServerID returns the mysql server id
func (*OperationHistory) GetPortNum ¶ added in v1.1.1
func (oh *OperationHistory) GetPortNum() int
GetPortNum returns the port number of mysql server
func (*OperationHistory) GetStartTime ¶ added in v1.1.1
func (oh *OperationHistory) GetStartTime() time.Time
GetStartTime returns the start time
func (*OperationHistory) GetStatus ¶ added in v1.1.1
func (oh *OperationHistory) GetStatus() int
GetStatus returns the status
func (*OperationHistory) GetStep ¶ added in v1.1.1
func (oh *OperationHistory) GetStep() int
GetStep returns the step, the unit is seconds
func (*OperationHistory) GetUserID ¶ added in v1.1.1
func (oh *OperationHistory) GetUserID() int
GetUserID returns the user id
type OperationInfo ¶
type OperationInfo struct {
// contains filtered or unexported fields
}
func (*OperationInfo) GetAppName ¶ added in v1.1.0
func (oi *OperationInfo) GetAppName() string
GetAppName returns the app name in string, it will concat all the app names with comma
func (*OperationInfo) GetApps ¶ added in v1.1.0
func (oi *OperationInfo) GetApps() []metadata.App
GetApps returns the apps
func (*OperationInfo) GetEndTime ¶ added in v1.1.0
func (oi *OperationInfo) GetEndTime() time.Time
GetEndTime returns the end time
func (*OperationInfo) GetMonitorSystem ¶ added in v1.1.0
func (oi *OperationInfo) GetMonitorSystem() metadata.MonitorSystem
GetMonitorSystem returns the monitor system
func (*OperationInfo) GetMySQLServer ¶ added in v1.1.0
func (oi *OperationInfo) GetMySQLServer() metadata.MySQLServer
GetMySQLServer returns the mysql server
func (*OperationInfo) GetOperationID ¶ added in v1.1.0
func (oi *OperationInfo) GetOperationID() int
GetOperationID returns the operation identity
func (*OperationInfo) GetStartTime ¶ added in v1.1.0
func (oi *OperationInfo) GetStartTime() time.Time
GetStartTime returns the start time
func (*OperationInfo) GetStep ¶ added in v1.1.0
func (oi *OperationInfo) GetStep() time.Duration
GetStep returns the step
func (*OperationInfo) GetUser ¶ added in v1.1.1
func (oi *OperationInfo) GetUser() metadata.User
GetUser returns the user
type PrometheusData ¶ added in v1.1.0
type PrometheusData struct { Timestamp string `middleware:"timestamp" json:"timestamp"` Value float64 `middleware:"value" json:"value"` }
func (*PrometheusData) GetTimestamp ¶ added in v1.1.0
func (pd *PrometheusData) GetTimestamp() string
func (*PrometheusData) GetValue ¶ added in v1.1.0
func (pd *PrometheusData) GetValue() float64
type PrometheusRepo ¶ added in v1.1.0
type PrometheusRepo struct {
// contains filtered or unexported fields
}
func NewPrometheusRepo ¶ added in v1.1.0
func NewPrometheusRepo(operationInfo healthcheck.OperationInfo, conn *prometheus.Conn) *PrometheusRepo
NewPrometheusRepo returns a new *PrometheusRepo
func (*PrometheusRepo) GetAverageActiveSessionPercents ¶ added in v1.1.0
func (pr *PrometheusRepo) GetAverageActiveSessionPercents() ([]healthcheck.PrometheusData, error)
GetAverageActiveSessionPercents gets the average active session percents
func (*PrometheusRepo) GetAvgBackupFailedRatio ¶ added in v1.1.0
func (pr *PrometheusRepo) GetAvgBackupFailedRatio() ([]healthcheck.PrometheusData, error)
GetAvgBackupFailedRatio gets the mysql backup information
func (*PrometheusRepo) GetCPUUsage ¶ added in v1.1.0
func (pr *PrometheusRepo) GetCPUUsage() ([]healthcheck.PrometheusData, error)
GetCPUUsage gets the cpu usage
func (*PrometheusRepo) GetCacheMissRatio ¶ added in v1.1.0
func (pr *PrometheusRepo) GetCacheMissRatio() ([]healthcheck.PrometheusData, error)
GetCacheMissRatio gets the cache miss ratio
func (*PrometheusRepo) GetConnectionUsage ¶ added in v1.1.0
func (pr *PrometheusRepo) GetConnectionUsage() ([]healthcheck.PrometheusData, error)
GetConnectionUsage gets the connection usage
func (*PrometheusRepo) GetDiskCapacityUsage ¶ added in v1.1.0
func (pr *PrometheusRepo) GetDiskCapacityUsage(mountPoints []string) ([]healthcheck.PrometheusData, error)
GetDiskCapacityUsage gets the disk capacity usage
func (*PrometheusRepo) GetFileSystems ¶ added in v1.1.0
func (pr *PrometheusRepo) GetFileSystems() ([]healthcheck.FileSystem, error)
GetFileSystems gets the file systems from the prometheus
func (*PrometheusRepo) GetIOUtil ¶ added in v1.1.0
func (pr *PrometheusRepo) GetIOUtil() ([]healthcheck.PrometheusData, error)
GetIOUtil gets the io util
func (*PrometheusRepo) GetOperationInfo ¶ added in v1.1.0
func (pr *PrometheusRepo) GetOperationInfo() healthcheck.OperationInfo
GetOperationInfo returns the operation information
func (*PrometheusRepo) GetStatisticFailedRatio ¶ added in v1.1.0
func (pr *PrometheusRepo) GetStatisticFailedRatio() ([]healthcheck.PrometheusData, error)
GetStatisticFailedRatio gets the statistic of mysql
type Result ¶
type Result struct { healthcheck.DASRepo ID int `middleware:"id" json:"id"` OperationID int `middleware:"operation_id" json:"operation_id"` HostIP string `middleware:"host_ip" json:"host_ip"` PortNum int `middleware:"port_num" json:"port_num"` WeightedAverageScore int `middleware:"weighted_average_score" json:"weighted_average_score"` DBConfigScore int `middleware:"db_config_score" json:"db_config_score"` DBConfigData string `middleware:"db_config_data" json:"db_config_data"` DBConfigAdvice string `middleware:"db_config_advice" json:"db_config_advice"` AvgBackupFailedRatioScore int `middleware:"avg_backup_failed_ratio_score" json:"avg_backup_failed_ratio_score"` AvgBackupFailedRatioData string `middleware:"avg_backup_failed_ratio_data" json:"avg_backup_failed_ratio_data"` AvgBackupFailedRatioHigh string `middleware:"avg_backup_failed_ratio_high" json:"avg_backup_failed_ratio_high"` StatisticFailedRatioScore int `middleware:"statistics_failed_ratio_score" json:"statistics_failed_ratio_score"` StatisticFailedRatioData string `middleware:"statistics_failed_ratio_data" json:"statistics_failed_ratio_data"` StatisticFailedRatioHigh string `middleware:"statistics_failed_ratio_high" json:"statistics_failed_ratio_high"` CPUUsageScore int `middleware:"cpu_usage_score" json:"cpu_usage_score"` CPUUsageData string `middleware:"cpu_usage_data" json:"cpu_usage_data"` CPUUsageHigh string `middleware:"cpu_usage_high" json:"cpu_usage_high"` IOUtilScore int `middleware:"io_util_score" json:"io_util_score"` IOUtilData string `middleware:"io_util_data" json:"io_util_data"` IOUtilHigh string `middleware:"io_util_high" json:"io_util_high"` DiskCapacityUsageScore int `middleware:"disk_capacity_usage_score" json:"disk_capacity_usage_score"` DiskCapacityUsageData string `middleware:"disk_capacity_usage_data" json:"disk_capacity_usage_data"` DiskCapacityUsageHigh string `middleware:"disk_capacity_usage_high" json:"disk_capacity_usage_high"` ConnectionUsageScore int `middleware:"connection_usage_score" json:"connection_usage_score"` ConnectionUsageData string `middleware:"connection_usage_data" json:"connection_usage_data"` ConnectionUsageHigh string `middleware:"connection_usage_high" json:"connection_usage_high"` AverageActiveSessionPercentsScore int `middleware:"average_active_session_percents_score" json:"average_active_session_percents_score"` AverageActiveSessionPercentsData string `middleware:"average_active_session_percents_data" json:"average_active_session_percents_data"` AverageActiveSessionPercentsHigh string `middleware:"average_active_session_percents_high" json:"average_active_session_percents_high"` CacheMissRatioScore int `middleware:"cache_miss_ratio_score" json:"cache_miss_ratio_score"` CacheMissRatioData string `middleware:"cache_miss_ratio_data" json:"cache_miss_ratio_data"` CacheMissRatioHigh string `middleware:"cache_miss_ratio_high" json:"cache_miss_ratio_high"` TableRowsScore int `middleware:"table_rows_score" json:"table_rows_score"` TableRowsData string `middleware:"table_rows_data" json:"table_rows_data"` TableRowsHigh string `middleware:"table_rows_high" json:"table_rows_high"` TableSizeScore int `middleware:"table_size_score" json:"table_size_score"` TableSizeData string `middleware:"table_size_data" json:"table_size_data"` TableSizeHigh string `middleware:"table_size_high" json:"table_size_high"` SlowQueryScore int `middleware:"slow_query_score" json:"slow_query_score"` SlowQueryData string `middleware:"slow_query_data" json:"slow_query_data"` SlowQueryAdvice string `middleware:"slow_query_advice" json:"slow_query_advice"` AccuracyReview int `middleware:"accuracy_review" json:"accuracy_review"` DelFlag int `middleware:"del_flag" json:"del_flag"` CreateTime time.Time `middleware:"create_time" json:"create_time"` LastUpdateTime time.Time `middleware:"last_update_time" json:"last_update_time"` }
Result include all data needed in healthcheck
func NewEmptyResultWithGlobal ¶
func NewEmptyResultWithGlobal() *Result
NewEmptyResultWithGlobal return a new Result
func NewEmptyResultWithOperationIDAndHostInfo ¶ added in v1.1.1
NewEmptyResultWithOperationIDAndHostInfo returns an empty *Result but with operation identity and host information
func NewEmptyResultWithRepo ¶
func NewEmptyResultWithRepo(repository healthcheck.DASRepo) *Result
NewEmptyResultWithRepo return a new Result
func NewResult ¶
func NewResult(repo healthcheck.DASRepo, operationID int, hostIP string, portNum int, weightedAverageScore int, dbConfigScore int, dbConfigData string, dbConfigAdvice string, avgBackupFailedRatioScore int, avgBackupFailedRatioData string, avgBackupFailedRatioHigh string, statisticScore int, statisticData string, statisticHigh string, cpuUsageScore int, cpuUsageData string, cpuUsageHigh string, ioUtilScore int, ioUtilData string, ioUtilHigh string, diskCapacityUsageScore int, diskCapacityUsageData string, diskCapacityUsageHigh string, connectionUsageScore int, connectionUsageData string, connectionUsageHigh string, averageActiveSessionPercentsScore int, averageActiveSessionPercentsData string, averageActiveSessionPercentsHigh string, cacheMissRatioScore int, cacheMissRatioData string, cacheMissRatioHigh string, tableRowsScore int, tableRowsData string, tableRowsHigh string, tableSizeScore int, tableSizeData string, tableSizeHigh string, slowQueryScore int, slowQueryData string, slowQueryAdvice string) *Result
NewResult returns a new *Result
func NewResultWithDefault ¶
func NewResultWithDefault(operationID int, hostIP string, portNum int, weightedAverageScore int, dbConfigScore int, avgBackupFailedRatioScore int, statisticFailedRatioScore int, cpuUsageScore int, ioUtilScore int, diskCapacityUsageScore int, connectionUsageScore int, averageActiveSessionPercentsScore int, cacheMissRatioScore int, tableRowsScore int, tableSizeScore int, slowQueryScore int, accuracyReview int) *Result
NewResultWithDefault returns a new *Result with default DASRepo
func (*Result) GetAccuracyReview ¶ added in v1.1.0
GetAccuracyReview returns the AccuracyReview
func (*Result) GetAverageActiveSessionPercentsData ¶ added in v1.1.0
GetAverageActiveSessionPercentsData returns the AverageActiveSessionPercentsData
func (*Result) GetAverageActiveSessionPercentsHigh ¶ added in v1.1.0
GetAverageActiveSessionPercentsHigh returns the AverageActiveSessionPercentsHigh
func (*Result) GetAverageActiveSessionPercentsScore ¶ added in v1.1.0
GetAverageActiveSessionPercentsScore returns the AverageActiveSessionPercentsScore
func (*Result) GetAvgBackupFailedRatioData ¶ added in v1.1.0
GetAvgBackupFailedRatioData returns the AvgBackupFailedRatioData
func (*Result) GetAvgBackupFailedRatioHigh ¶ added in v1.1.0
GetAvgBackupFailedRatioHigh returns the AvgBackupFailedRatioHigh
func (*Result) GetAvgBackupFailedRatioScore ¶ added in v1.1.0
GetAvgBackupFailedRatioScore returns the AvgBackupFailedRatioScore
func (*Result) GetCPUUsageData ¶
GetCPUUsageData returns the CPUUsageData
func (*Result) GetCPUUsageHigh ¶
GetCPUUsageHigh returns the CPUUsageHigh
func (*Result) GetCPUUsageScore ¶
GetCPUUsageScore returns the CPUUsageScore
func (*Result) GetCacheMissRatioData ¶
GetCacheMissRatioData returns the CacheMissRatioData
func (*Result) GetCacheMissRatioHigh ¶
GetCacheMissRatioHigh returns the CacheMissRatioHigh
func (*Result) GetCacheMissRatioScore ¶
GetCacheMissRatioScore returns the CacheMissRatioScore
func (*Result) GetConnectionUsageData ¶
GetConnectionUsageData returns the ConnectionUsageData
func (*Result) GetConnectionUsageHigh ¶
GetConnectionUsageHigh returns the ConnectionUsageHigh
func (*Result) GetConnectionUsageScore ¶
GetConnectionUsageScore returns the ConnectionUsageScore
func (*Result) GetCreateTime ¶
GetCreateTime returns the create time
func (*Result) GetDBConfigAdvice ¶
GetDBConfigAdvice returns the DBConfigAdvice
func (*Result) GetDBConfigData ¶
GetDBConfigData returns the DBConfigData
func (*Result) GetDBConfigScore ¶
GetDBConfigScore returns the DBConfigScore
func (*Result) GetDiskCapacityUsageData ¶
GetDiskCapacityUsageData returns the DiskCapacityUsageData
func (*Result) GetDiskCapacityUsageHigh ¶
GetDiskCapacityUsageHigh returns the DiskCapacityUsageHigh
func (*Result) GetDiskCapacityUsageScore ¶
GetDiskCapacityUsageScore returns the DiskCapacityUsageScore
func (*Result) GetIOUtilData ¶
GetIOUtilData returns the IOUtilData
func (*Result) GetIOUtilHigh ¶
GetIOUtilHigh returns the IOUtilHigh
func (*Result) GetIOUtilScore ¶
GetIOUtilScore returns the IOUtilScore
func (*Result) GetLastUpdateTime ¶
GetLastUpdateTime returns the last update time
func (*Result) GetOperationID ¶
GetOperationID returns the OperationID
func (*Result) GetPortNum ¶ added in v1.1.1
Identity returns the port number
func (*Result) GetSlowQueryAdvice ¶
GetSlowQueryAdvice returns the SlowQueryAdvice
func (*Result) GetSlowQueryData ¶
GetSlowQueryData returns the SlowQueryData
func (*Result) GetSlowQueryScore ¶
GetSlowQueryScore returns the SlowQueryScore
func (*Result) GetStatisticFailedRatioData ¶ added in v1.1.0
GetStatisticFailedRatioData returns the StatisticFailedRatioData
func (*Result) GetStatisticFailedRatioHigh ¶ added in v1.1.0
GetStatisticFailedRatioHigh returns the StatisticFailedRatioHigh
func (*Result) GetStatisticFailedRatioScore ¶ added in v1.1.0
GetStatisticFailedRatioScore returns the StatisticFailedRatioScore
func (*Result) GetTableRowsData ¶ added in v1.1.0
GetTableRowsData returns the TableRowsData
func (*Result) GetTableRowsHigh ¶ added in v1.1.0
GetTableRowsHigh returns the TableRowsHigh
func (*Result) GetTableRowsScore ¶ added in v1.1.0
GetTableRowsScore returns the TableRowsScore
func (*Result) GetTableSizeData ¶
GetTableSizeData returns the TableSizeData
func (*Result) GetTableSizeHigh ¶
GetTableSizeHigh returns the TableSizeHigh
func (*Result) GetTableSizeScore ¶
GetTableSizeScore returns the TableSizeScore
func (*Result) GetWeightedAverageScore ¶
GetWeightedAverageScore returns the WeightedAverageScore
func (*Result) MarshalJSON ¶
MarshalJSON marshals health check to json string
func (*Result) MarshalJSONWithFields ¶
MarshalJSONWithFields marshals only specified field of the health check to json string
type Service ¶
type Service struct { healthcheck.DASRepo OperationInfo healthcheck.OperationInfo Engine healthcheck.Engine Result healthcheck.Result `json:"result"` OperationHistories []healthcheck.OperationHistory `json:"operation_histories"` }
Service of health check
func (*Service) Check ¶
func (s *Service) Check(mysqlServerID int, startTime, endTime time.Time, step time.Duration, loginName string) (int, error)
Check performs healthcheck on the mysql server with given mysql server id, initiating is synchronous, actual running is asynchronous
func (*Service) CheckByHostInfo ¶
func (s *Service) CheckByHostInfo(hostIP string, portNum int, startTime, endTime time.Time, step time.Duration, loginName string) (int, error)
CheckByHostInfo performs healthcheck on the mysql server with given mysql server id, initiating is synchronous, actual running is asynchronous
func (*Service) GetDASRepo ¶ added in v1.1.0
func (s *Service) GetDASRepo() healthcheck.DASRepo
GetDASRepo returns the das repository
func (*Service) GetEngine ¶ added in v1.1.0
func (s *Service) GetEngine() healthcheck.Engine
GetEngine returns the healthcheck engine
func (*Service) GetOperationHistories ¶ added in v1.1.1
func (s *Service) GetOperationHistories() []healthcheck.OperationHistory
GetOperationHistories returns the operation histories
func (*Service) GetOperationHistoriesByLoginName ¶ added in v1.1.1
GetOperationHistoriesByLoginName returns the operation histories by login name
func (*Service) GetOperationInfo ¶ added in v1.1.0
func (s *Service) GetOperationInfo() healthcheck.OperationInfo
GetOperationInfo returns the operation information
func (*Service) GetResult ¶
func (s *Service) GetResult() healthcheck.Result
GetResult returns the healthcheck result
func (*Service) GetResultByOperationID ¶
GetResultByOperationID gets the result of given operation id
func (*Service) MarshalWithFields ¶ added in v1.1.0
MarshalWithFields marshals only specified fields of the Service to json bytes
func (*Service) ReviewAccuracy ¶ added in v1.1.0
ReviewAccuracy updates accuracy review with given operation id