Documentation ¶
Index ¶
Constants ¶
const (
// APIPathPrefix is the prefix of the API path.
APIPathPrefix = "/tso/api/v1"
)
Variables ¶
This section is empty.
Functions ¶
func GetKeyspaceGroupMembers ¶
GetKeyspaceGroupMembers gets the keyspace group members that the TSO service is serving.
func ResetTS ¶
ResetTS is the http.HandlerFunc of ResetTS FIXME: details of input json body params @Tags admin @Summary Reset the ts. @Accept json @Param body body object true "json params" @Produce json @Success 200 {string} string "Reset ts successfully." @Failure 400 {string} string "The input is invalid." @Failure 403 {string} string "Reset ts is forbidden." @Failure 500 {string} string "TSO server failed to proceed the request." @Failure 503 {string} string "It's a temporary failure, please retry." @Router /admin/reset-ts [post] if force-use-larger=true:
reset ts to max(current ts, input ts).
else:
reset ts to input ts if it > current ts and < upper bound, error if not in that range
during EBS based restore, we call this to make sure ts of pd >= resolved_ts in backup.
Types ¶
type KeyspaceGroupMember ¶
type KeyspaceGroupMember struct { Group *endpoint.KeyspaceGroup Member *tsopb.Participant IsPrimary bool `json:"is_primary"` PrimaryID uint64 `json:"primary_id"` }
KeyspaceGroupMember contains the keyspace group and its member information.
type ResetTSParams ¶
ResetTSParams is the input json body params of ResetTS
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the tso service.
func NewService ¶
NewService returns a new Service.
func (*Service) RegisterAdminRouter ¶
func (s *Service) RegisterAdminRouter()
RegisterAdminRouter registers the router of the TSO admin handler.
func (*Service) RegisterConfigRouter ¶
func (s *Service) RegisterConfigRouter()
RegisterConfigRouter registers the router of the config handler.
func (*Service) RegisterHealthRouter ¶
func (s *Service) RegisterHealthRouter()
RegisterHealthRouter registers the router of the health handler.
func (*Service) RegisterKeyspaceGroupRouter ¶
func (s *Service) RegisterKeyspaceGroupRouter()
RegisterKeyspaceGroupRouter registers the router of the TSO keyspace group handler.
func (*Service) RegisterPrimaryRouter ¶
func (s *Service) RegisterPrimaryRouter()
RegisterPrimaryRouter registers the router of the primary handler.