influxdb/mock/write_service.go

19 lines
425 B
Go
Raw Normal View History

2018-10-25 17:31:22 +00:00
package mock
import (
"context"
"io"
"github.com/influxdata/platform"
)
// WriteService writes data read from the reader.
type WriteService struct {
WriteF func(context.Context, platform.ID, platform.ID, io.Reader) error
}
// Write calls the mocked WriteF function with arguments.
func (s *WriteService) Write(ctx context.Context, org, bucket platform.ID, r io.Reader) error {
return s.WriteF(ctx, org, bucket, r)
}