()
| 940 | } |
| 941 | |
| 942 | func (f *Ferry) SerializeStateToJSON() (string, error) { |
| 943 | if f.StateTracker == nil { |
| 944 | err := errors.New("no valid StateTracker") |
| 945 | return "", err |
| 946 | } |
| 947 | var binlogVerifyStore *BinlogVerifyStore = nil |
| 948 | if f.inlineVerifier != nil { |
| 949 | binlogVerifyStore = f.inlineVerifier.reverifyStore |
| 950 | } |
| 951 | |
| 952 | serializedState := f.StateTracker.Serialize(f.Tables, binlogVerifyStore) |
| 953 | |
| 954 | if f.Config.DoNotIncludeSchemaCacheInStateDump { |
| 955 | serializedState.LastKnownTableSchemaCache = nil |
| 956 | } |
| 957 | |
| 958 | stateBytes, err := json.MarshalIndent(serializedState, "", " ") |
| 959 | return string(stateBytes), err |
| 960 | } |
| 961 | |
| 962 | func (f *Ferry) Progress() *Progress { |
| 963 | s := &Progress{ |
no test coverage detected