20 lines
329 B
Go
20 lines
329 B
Go
|
package elasticstream
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
)
|
||
|
|
||
|
type Position struct {
|
||
|
ID string
|
||
|
Index string
|
||
|
Pos int
|
||
|
}
|
||
|
|
||
|
type Source interface {
|
||
|
Configure(context.Context, Config) error
|
||
|
Open(context.Context, []Position) error
|
||
|
Read(context.Context) (*Data, error)
|
||
|
Ack(context.Context, Position) error
|
||
|
Teardown(context.Context) error
|
||
|
}
|