Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMetric ¶
RegisterMetric registers the metric handler.
Types ¶
type APIInfo ¶
type APIInfo struct {
// contains filtered or unexported fields
}
func NewAPIInfo ¶
func NewAPIInfo() *APIInfo
func (*APIInfo) SetServiceStatusFatalError ¶
func (*APIInfo) SetServiceStatusIdle ¶
func (s *APIInfo) SetServiceStatusIdle()
func (*APIInfo) SetTableFatalError ¶
func (*APIInfo) SetTableStage ¶
func (s *APIInfo) SetTableStage(table string, stage TableStage)
type APIService ¶
type APIService struct {
APIInfo *APIInfo
// contains filtered or unexported fields
}
var GlobalInstance *APIService = New()
func New ¶
func New() *APIService
func (*APIService) Serve ¶
func (service *APIService) Serve(l net.Listener)
type InfoResponse ¶
type InfoResponse struct {
Status ServiceStatus `json:"status,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
TablesInfo map[string]*TableInfo `json:"tables_info,omitempty"`
}
type ServiceStatus ¶
type ServiceStatus string
const ( ServiceStatusRunning ServiceStatus = "running" ServiceStatusIdle ServiceStatus = "idle" // For example, when connect S3 failed, all table replication will be failed ServiceStatusFatalError ServiceStatus = "fatal_error" )
type TableInfo ¶
type TableInfo struct {
Stage TableStage `json:"stage,omitempty"`
Status TableStatus `json:"status,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
}
type TableStage ¶
type TableStage string
const ( TableStageUnknown TableStage = "unknown" TableStageLoadingSnapshot TableStage = "loading_snapshot" TableStageLoadingIncremental TableStage = "loading_incremental" TableStageFinished TableStage = "finished" )
type TableStatus ¶
type TableStatus string
const ( TableStatusNormal TableStatus = "normal" TableStatusFatalError TableStatus = "fatal_error" )
Click to show internal directories.
Click to hide internal directories.