Documentation ¶
Index ¶
- Constants
- func ForwardToCapture(c *gin.Context, fromID, toAddr string)
- func ForwardToOwner(c *gin.Context, p capture.Capture)
- func HandleOwnerBalance(ctx context.Context, capture capture.Capture, changefeedID model.ChangeFeedID) error
- func HandleOwnerDrainCapture(ctx context.Context, capture capture.Capture, captureID string) (*model.DrainCaptureResp, error)
- func HandleOwnerJob(ctx context.Context, capture capture.Capture, job model.AdminJob) error
- func HandleOwnerScheduleTable(ctx context.Context, capture capture.Capture, changefeedID model.ChangeFeedID, ...) error
- func IsHTTPBadRequestError(err error) bool
- func WriteData(w http.ResponseWriter, data interface{})
- func WriteError(w http.ResponseWriter, statusCode int, err error)
Constants ¶
View Source
const ( // OpVarAdminJob is the key of admin job in HTTP API OpVarAdminJob = "admin-job" // OpVarChangefeedID is the key of changefeed ID in HTTP API OpVarChangefeedID = "cf-id" // OpVarTargetCaptureID is the key of to-capture ID in HTTP API OpVarTargetCaptureID = "target-cp-id" // OpVarTableID is the key of table ID in HTTP API OpVarTableID = "table-id" // APIOpVarChangefeedState is the key of changefeed state in HTTP API. APIOpVarChangefeedState = "state" // APIOpVarChangefeedID is the key of changefeed ID in HTTP API. APIOpVarChangefeedID = "changefeed_id" // APIOpVarCaptureID is the key of capture ID in HTTP API. APIOpVarCaptureID = "capture_id" // APIOpVarNamespace is the key of changefeed namespace in HTTP API. APIOpVarNamespace = "namespace" // APIOpVarTiCDCUser is the key of ticdc user in HTTP API. APIOpVarTiCDCUser = "user" // APIOpVarTiCDCPassword is the key of ticdc password in HTTP API. APIOpVarTiCDCPassword = "password" )
Variables ¶
This section is empty.
Functions ¶
func ForwardToCapture ¶
ForwardToCapture forward request to another
func ForwardToOwner ¶
ForwardToOwner forwards a request to the controller
func HandleOwnerBalance ¶
func HandleOwnerBalance( ctx context.Context, capture capture.Capture, changefeedID model.ChangeFeedID, ) error
HandleOwnerBalance balance the changefeed tables
func HandleOwnerDrainCapture ¶
func HandleOwnerDrainCapture( ctx context.Context, capture capture.Capture, captureID string, ) (*model.DrainCaptureResp, error)
HandleOwnerDrainCapture schedule drain the target capture
func HandleOwnerJob ¶
HandleOwnerJob enqueue the admin job
func HandleOwnerScheduleTable ¶
func HandleOwnerScheduleTable( ctx context.Context, capture capture.Capture, changefeedID model.ChangeFeedID, captureID string, tableID int64, ) error
HandleOwnerScheduleTable schedule tables
func IsHTTPBadRequestError ¶
IsHTTPBadRequestError check if a error is a http bad request error
func WriteData ¶
func WriteData(w http.ResponseWriter, data interface{})
WriteData write data to response with http status code 200
func WriteError ¶
func WriteError(w http.ResponseWriter, statusCode int, err error)
WriteError write error message to response
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.