Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitMonitor ¶
func InitMonitor()
Types ¶
type Coordinator ¶
type Coordinator struct { PrimaryNodeID int `db:"primary_node_id" json:"primary_node_id"` Name string `db:"primary_name" json:"name"` Host string `db:"primary_host" json:"host"` Port int `db:"primary_port" json:"port"` }
func GetCoordinator ¶
func GetCoordinator() (*Coordinator, error)
type Node ¶
type Node struct { FormationID string `db:"formationid" json:"formation_id"` ID int `db:"nodeid" json:"id"` GroupID int `db:"groupid" json:"group_id"` Name string `db:"nodename" json:"name"` Host string `db:"nodehost" json:"host"` Port int `db:"nodeport" json:"port"` SysIdentifier string `db:"sysidentifier" json:"sys_identifier"` GoalState string `db:"goalstate" json:"goal_state"` ReportedState string `db:"reportedstate" json:"reported_state"` ReportedPGIsRunning bool `db:"reportedpgisrunning" json:"reported_pg_is_running"` ReportedRepState string `db:"reportedrepstate" json:"reported_rep_state"` ReportTime time.Time `db:"reporttime" json:"report_time"` ReportedLSN string `db:"reportedlsn" json:"reported_lsn"` WALReportTime time.Time `db:"walreporttime" json:"wal_report_time"` Health int `db:"health" json:"health"` HealthCheckTime time.Time `db:"healthchecktime" json:"health_check_time"` StateChangeTime time.Time `db:"statechangetime" json:"state_change_time"` CandidatePriority int `db:"candidatepriority" json:"candidate_priority"` ReplicationQuorum bool `db:"replicationquorum" json:"replication_quorum"` NodeCluster string `db:"nodecluster" json:"node_cluster"` IsCoordinator bool `db:"-" json:"-"` }
func GetAllCoordinators ¶
type NullBool ¶
NullBool is an alias for sql.NullBool data type
func (NullBool) MarshalJSON ¶
MarshalJSON for NullBool
func (*NullBool) UnmarshalJSON ¶
UnmarshalJSON for NullBool
type NullFloat64 ¶
type NullFloat64 struct {
sql.NullFloat64
}
NullFloat64 is an alias for sql.NullFloat64 data type
func Float64ToNullFloat64 ¶
func Float64ToNullFloat64(f float64) NullFloat64
func (NullFloat64) MarshalJSON ¶
func (nf NullFloat64) MarshalJSON() ([]byte, error)
MarshalJSON for NullFloat64
func (*NullFloat64) UnmarshalJSON ¶
func (nf *NullFloat64) UnmarshalJSON(b []byte) error
UnmarshalJSON for NullFloat64
type NullInt64 ¶
NullInt64 is an alias for sql.NullInt64 data type
func Int64ToNullInt64 ¶
func (NullInt64) MarshalJSON ¶
MarshalJSON for NullInt64
func (*NullInt64) UnmarshalJSON ¶
UnmarshalJSON for NullInt64
type NullString ¶
type NullString struct {
sql.NullString
}
NullString is an alias for sql.NullString data type
func StringToNullString ¶
func StringToNullString(s string) NullString
func (NullString) MarshalJSON ¶
func (ns NullString) MarshalJSON() ([]byte, error)
MarshalJSON for NullString
func (*NullString) ToString ¶
func (ns *NullString) ToString() string
func (*NullString) UnmarshalJSON ¶
func (ns *NullString) UnmarshalJSON(b []byte) error
UnmarshalJSON for NullString
type NullTime ¶
func (NullTime) MarshalJSON ¶
func (*NullTime) UnmarshalJSON ¶
UnmarshalJSON for NullTime
type Worker ¶
type Worker struct { ID int `db:"nodeid" json:"id"` GroupID int `db:"groupid" json:"group_id"` Host string `db:"nodename" json:"host"` Port int `db:"nodeport" json:"port"` Rack string `db:"noderack" json:"rack"` HasMetaData NullBool `db:"hasmetadata" json:"has_meta_data"` Active bool `db:"isactive" json:"active"` Role string `db:"noderole" json:"role"` Cluster string `db:"nodecluster" json:"cluster"` MetaDataSynced NullBool `db:"metadatasynced" json:"meta_data_synced"` ShouldHaveShards bool `db:"shouldhaveshards" json:"should_have_shards"` }
func GetPrimaryWorkers ¶
Click to show internal directories.
Click to hide internal directories.