v1

package
v0.0.0-...-1d14c1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterOpenAPIRoutes

func RegisterOpenAPIRoutes(router *gin.Engine, api OpenAPI)

RegisterOpenAPIRoutes registers routes for OpenAPI

func SetLogLevel

func SetLogLevel(c *gin.Context)

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 NewOpenAPI

func NewOpenAPI(c capture.Capture) OpenAPI

NewOpenAPI creates a new OpenAPI.

func NewOpenAPI4Test

func NewOpenAPI4Test(c capture.Capture, p owner.StatusProvider) OpenAPI

NewOpenAPI4Test return a OpenAPI for test

func (*OpenAPI) CreateChangefeed

func (h *OpenAPI) CreateChangefeed(c *gin.Context)

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

func (h *OpenAPI) DrainCapture(c *gin.Context)

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

func (h *OpenAPI) GetChangefeed(c *gin.Context)

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

func (h *OpenAPI) GetProcessor(c *gin.Context)

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

func (h *OpenAPI) Health(c *gin.Context)

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

func (h *OpenAPI) ListCapture(c *gin.Context)

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

func (h *OpenAPI) ListChangefeed(c *gin.Context)

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

func (h *OpenAPI) ListProcessor(c *gin.Context)

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

func (h *OpenAPI) MoveTable(c *gin.Context)

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

func (h *OpenAPI) PauseChangefeed(c *gin.Context)

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

func (h *OpenAPI) RebalanceTables(c *gin.Context)

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

func (h *OpenAPI) RemoveChangefeed(c *gin.Context)

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

func (h *OpenAPI) ResignController(c *gin.Context)

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

func (h *OpenAPI) ResumeChangefeed(c *gin.Context)

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

func (h *OpenAPI) ServerStatus(c *gin.Context)

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

func (h *OpenAPI) UpdateChangefeed(c *gin.Context)

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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL