2024-03-22 18:05:47 +08:00
|
|
|
package interfaces
|
|
|
|
|
|
|
|
import "context"
|
|
|
|
|
|
|
|
type DumpIO interface {
|
2024-03-27 17:44:01 +08:00
|
|
|
ReadData(context.Context, int, map[string]any) ([]*ESSource, error)
|
2024-03-22 18:05:47 +08:00
|
|
|
WriteData(ctx context.Context, docs []*ESSource) (int, error)
|
|
|
|
|
2024-03-27 17:44:01 +08:00
|
|
|
ResetOffset()
|
|
|
|
|
2024-03-22 18:05:47 +08:00
|
|
|
ReadMapping(context.Context) (map[string]any, error)
|
|
|
|
WriteMapping(context.Context, map[string]any) error
|
|
|
|
|
|
|
|
ReadSetting(ctx context.Context) (map[string]any, error)
|
|
|
|
WriteSetting(context.Context, map[string]any) error
|
|
|
|
|
|
|
|
Close() error
|
|
|
|
|
|
|
|
IOType() IO
|
|
|
|
IsFile() bool
|
|
|
|
}
|