INNER CODE UNIT · Go

main

pingcap/tidb-operator · cmd/prestop-checker/main.go:257

func main() {
	opt := Options{}
	opt.Parse()

	cfg, err := opt.Complete()
	if err != nil {
		Fatalf("invalid config for prestop-checker: %v\n", err)
	}

	switch cfg.Mode {
	case ModeTiKV:
		if err := RunTiKVPrestopHook(context.Background(), cfg.TiKV); err != nil {
			Fatalf("failed to run tikv prestop hook: %v\n", err)
		}
	case ModeTiCDC:
		if err := RunTiCDCPrestopHook(context.Background(), cfg.TiCDC); err != nil {
			Fatalf("failed to run ticdc prestop hook: %v\n", err)
		}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…