Documentation ¶
Index ¶
- func RegisterOpenAPIRoutes(router *gin.Engine, api OpenAPI)
- func SetLogLevel(c *gin.Context)
- func VerifyUpdateChangefeedConfig(ctx context.Context, changefeedConfig model.ChangefeedConfig, ...) (*model.ChangeFeedInfo, error)
- type OpenAPI
- func (h *OpenAPI) CreateChangefeed(c *gin.Context)
- func (h *OpenAPI) DrainCapture(c *gin.Context)
- func (h *OpenAPI) GetChangefeed(c *gin.Context)
- func (h *OpenAPI) GetProcessor(c *gin.Context)
- func (h *OpenAPI) Health(c *gin.Context)
- func (h *OpenAPI) ListCapture(c *gin.Context)
- func (h *OpenAPI) ListChangefeed(c *gin.Context)
- func (h *OpenAPI) ListProcessor(c *gin.Context)
- func (h *OpenAPI) MoveTable(c *gin.Context)
- func (h *OpenAPI) PauseChangefeed(c *gin.Context)
- func (h *OpenAPI) RebalanceTables(c *gin.Context)
- func (h *OpenAPI) RemoveChangefeed(c *gin.Context)
- func (h *OpenAPI) ResignController(c *gin.Context)
- func (h *OpenAPI) ResumeChangefeed(c *gin.Context)
- func (h *OpenAPI) ServerStatus(c *gin.Context)
- func (h *OpenAPI) UpdateChangefeed(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterOpenAPIRoutes ¶
RegisterOpenAPIRoutes registers routes for OpenAPI
func SetLogLevel ¶
SetLogLevel changes TiCDC log level dynamically. @Summary Change TiCDC log level @Description change TiCDC log level dynamically @Tags common @Accept json @Produce json @Param log_level body string true "log level" @Success 200 @Failure 400 {object} model.HTTPError @Router /api/v1/log [post]
func VerifyUpdateChangefeedConfig ¶
func VerifyUpdateChangefeedConfig(ctx context.Context, changefeedConfig model.ChangefeedConfig, oldInfo *model.ChangeFeedInfo, ) (*model.ChangeFeedInfo, error)
VerifyUpdateChangefeedConfig verify ChangefeedConfig for update a changefeed
Types ¶
type OpenAPI ¶
type OpenAPI struct {
// contains filtered or unexported fields
}
OpenAPI provides capture APIs.
func NewOpenAPI4Test ¶
func NewOpenAPI4Test(c capture.Capture, p owner.StatusProvider) OpenAPI
NewOpenAPI4Test return a OpenAPI for test
func (*OpenAPI) CreateChangefeed ¶
CreateChangefeed creates a changefeed @Summary Create changefeed @Description create a new changefeed @Tags changefeed @Accept json @Produce json @Param changefeed body model.ChangefeedConfig true "changefeed config" @Success 202 @Failure 500,400 {object} model.HTTPError @Router /api/v1/changefeeds [post]
func (*OpenAPI) DrainCapture ¶
DrainCapture remove all tables at the given capture. @Summary Drain captures @Description Drain all tables at the target captures in cdc cluster @Tags capture @Accept json @Produce json @Success 200,202 @Failure 503,500,400 {object} model.HTTPError @Router /api/v1/captures/drain [put]
func (*OpenAPI) GetChangefeed ¶
GetChangefeed get detailed info of a changefeed @Summary Get changefeed @Description get detail information of a changefeed @Tags changefeed @Accept json @Produce json @Param changefeed_id path string true "changefeed_id" @Success 200 {object} model.ChangefeedDetail @Failure 500,400 {object} model.HTTPError @Router /api/v1/changefeeds/{changefeed_id} [get]
func (*OpenAPI) GetProcessor ¶
GetProcessor gets the detailed info of a processor @Summary Get processor detail information @Description get the detail information of a processor @Tags processor @Accept json @Produce json @Param changefeed_id path string true "changefeed ID" @Param capture_id path string true "capture ID" @Success 200 {object} model.ProcessorDetail @Failure 500,400 {object} model.HTTPError @Router /api/v1/processors/{changefeed_id}/{capture_id} [get]
func (*OpenAPI) Health ¶
Health check if cdc cluster is health @Summary Check if CDC cluster is health @Description check if CDC cluster is health @Tags common @Accept json @Produce json @Success 200 @Failure 500 {object} model.HTTPError @Router /api/v1/health [get]
func (*OpenAPI) ListCapture ¶
ListCapture lists all captures @Summary List captures @Description list all captures in cdc cluster @Tags capture @Accept json @Produce json @Success 200 {array} model.Capture @Failure 500,400 {object} model.HTTPError @Router /api/v1/captures [get]
func (*OpenAPI) ListChangefeed ¶
ListChangefeed lists all changgefeeds in cdc cluster @Summary List changefeed @Description list all changefeeds in cdc cluster @Tags changefeed @Accept json @Produce json @Param state query string false "state" @Success 200 {array} model.ChangefeedCommonInfo @Failure 500 {object} model.HTTPError @Router /api/v1/changefeeds [get]
func (*OpenAPI) ListProcessor ¶
ListProcessor lists all processors in the TiCDC cluster @Summary List processors @Description list all processors in the TiCDC cluster @Tags processor @Accept json @Produce json @Success 200 {array} model.ProcessorCommonInfo @Failure 500,400 {object} model.HTTPError @Router /api/v1/processors [get]
func (*OpenAPI) MoveTable ¶
MoveTable moves a table to target capture @Summary move table @Description move one table to the target capture @Tags changefeed @Accept json @Produce json @Param changefeed_id path string true "changefeed_id" @Param MoveTable body model.MoveTableReq true "move table request" @Success 202 @Failure 500,400 {object} model.HTTPError @Router /api/v1/changefeeds/{changefeed_id}/tables/move_table [post]
func (*OpenAPI) PauseChangefeed ¶
PauseChangefeed pauses a changefeed @Summary Pause a changefeed @Description Pause a changefeed @Tags changefeed @Accept json @Produce json @Param changefeed_id path string true "changefeed_id" @Success 202 @Failure 500,400 {object} model.HTTPError @Router /api/v1/changefeeds/{changefeed_id}/pause [post]
func (*OpenAPI) RebalanceTables ¶
RebalanceTables rebalances tables @Summary rebalance tables @Description rebalance all tables of a changefeed @Tags changefeed @Accept json @Produce json @Param changefeed_id path string true "changefeed_id" @Success 202 @Failure 500,400 {object} model.HTTPError @Router /api/v1/changefeeds/{changefeed_id}/tables/rebalance_table [post]
func (*OpenAPI) RemoveChangefeed ¶
RemoveChangefeed removes a changefeed @Summary Remove a changefeed @Description Remove a changefeed @Tags changefeed @Accept json @Produce json @Param changefeed_id path string true "changefeed_id" @Success 202 @Failure 500,400 {object} model.HTTPError @Router /api/v1/changefeeds/{changefeed_id} [delete]
func (*OpenAPI) ResignController ¶
ResignController makes the current controller resign @Summary notify the ticdc cluster controller to resign @Description notify the current controller to resign @Tags owner @Accept json @Produce json @Success 202 @Failure 500,400 {object} model.HTTPError @Router /api/v1/owner/resign [post]
func (*OpenAPI) ResumeChangefeed ¶
ResumeChangefeed resumes a changefeed @Summary Resume a changefeed @Description Resume a changefeed @Tags changefeed @Accept json @Produce json @Param changefeed_id path string true "changefeed_id" @Success 202 @Failure 500,400 {object} model.HTTPError @Router /api/v1/changefeeds/{changefeed_id}/resume [post]
func (*OpenAPI) ServerStatus ¶
ServerStatus gets the status of server(capture) @Summary Get server status @Description get the status of a server(capture) @Tags common @Accept json @Produce json @Success 200 {object} model.ServerStatus @Failure 500,400 {object} model.HTTPError @Router /api/v1/status [get]
func (*OpenAPI) UpdateChangefeed ¶
UpdateChangefeed updates a changefeed @Summary Update a changefeed @Description Update a changefeed @Tags changefeed @Accept json @Produce json @Param changefeed_id path string true "changefeed_id" @Param changefeedConfig body model.ChangefeedConfig true "changefeed config" @Success 202 @Failure 500,400 {object} model.HTTPError @Router /api/v1/changefeeds/{changefeed_id} [put]