mtsatellite/interleaver/interfaces.go
Sascha L. Teichmann 0b96dda52c go fmt'ed.
2014-08-19 12:23:33 +02:00

33 lines
559 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 (
"fmt"
"bitbucket.org/s_l_teichmann/mtredisalize/common"
)
var NoMoreBlocksErr = fmt.Errorf("No more blocks.")
type (
Block struct {
Coord common.Coord
Data []byte
}
BlocKProducer interface {
// Returns next block.
// error is NoMoreBlocksErr if it run out of blocks.
Next() (Block, error)
Close() error
}
BlockConsumer interface {
Consume(Block)
Close() error
}
)