mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-08 11:10:27 +01:00
32 lines
541 B
Go
32 lines
541 B
Go
// Copyright 2014 by Sascha L. Teichmann
|
|
// Use of this source code is governed by the MIT license
|
|
// that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"bitbucket.org/s_l_teichmann/mtredisalize/common"
|
|
)
|
|
|
|
var NoMoreBlocksErr = errors.New("No more blocks.")
|
|
|
|
type (
|
|
Block struct {
|
|
Coord common.Coord
|
|
Data []byte
|
|
}
|
|
|
|
BlocKProducer interface {
|
|
// error is NoMoreBlocksErr if it run out of blocks.
|
|
Next(*Block) error
|
|
Close() error
|
|
}
|
|
|
|
BlockConsumer interface {
|
|
Consume(*Block) error
|
|
Close() error
|
|
}
|
|
)
|