Documentation ¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) IsDrainerTombstone(ctx context.Context, addr string) (bool, error)
- func (c *Client) IsPumpTombstone(ctx context.Context, addr string) (bool, error)
- func (c *Client) OfflineDrainer(ctx context.Context, addr string) error
- func (c *Client) OfflinePump(ctx context.Context, addr string) error
- func (c *Client) PumpNodeStatus(ctx context.Context) (status []*v1alpha1.PumpNodeStatus, err error)
- func (c *Client) UpdateDrainerState(ctx context.Context, addr string, state string) error
- func (c *Client) UpdatePumpState(ctx context.Context, addr string, state string) error
- type StatusResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // if setted, will call HookAddr to change the address of pump/drainer // before accessing pump/drainer. HookAddr func(addr string) (changedAddr string) // contains filtered or unexported fields }
Client is the client of binlog.
func NewBinlogClient ¶
func NewBinlogClient(pdEndpoint []string, tlsConfig *tls.Config, timeout time.Duration) (*Client, error)
NewBinlogClient create a Client and return an error if the underlying conn is not up within timeout duration.
func (*Client) IsDrainerTombstone ¶
IsDrainerTombstone check if drainer is tombstone.
func (*Client) IsPumpTombstone ¶
IsPumpTombstone check if drainer is tombstone.
func (*Client) OfflineDrainer ¶
OfflineDrainer offline a drainer.
func (*Client) OfflinePump ¶
OfflinePump offline a pump.
func (*Client) PumpNodeStatus ¶
func (*Client) UpdateDrainerState ¶
UpdateDrainerState update the specify state as the specified state.
type StatusResp ¶
StatusResp represents the response of status api.
Click to show internal directories.
Click to hide internal directories.