Documentation ¶
Index ¶
- Constants
- Variables
- type Accumulator
- type AccumulatorData
- type BlockMapReducer
- func (reducer *BlockMapReducer) BlockRange() (from, to uint32)
- func (reducer *BlockMapReducer) Initialise(client *rpc.Client) (interface{}, error)
- func (reducer *BlockMapReducer) Map(client *rpc.Client, emit func(interface{}) error, block *rpc.Block) error
- func (reducer *BlockMapReducer) ProcessResults(_acc interface{}, nextBlockToProcess uint32) error
- func (reducer *BlockMapReducer) Reduce(client *rpc.Client, _acc, _next interface{}) (interface{}, error)
- type Config
- type Data
- type State
- type Story
Constants ¶
View Source
const ( StateFilename = "mapreduce.json" OutputFilename = "output.txt" )
View Source
const DataDirectoryEnvironmentKey = "STEEMREDUCE_PARAMS_DATA_DIR"
View Source
const Id = "account_pending_payout"
Variables ¶
View Source
var DefaultDataDirectoryPath = filepath.Join("steemreduce_data", Id)
Functions ¶
This section is empty.
Types ¶
type Accumulator ¶
type AccumulatorData ¶
type AccumulatorData struct {
*Accumulator
}
func (*AccumulatorData) UnmarshalJSON ¶
func (accData *AccumulatorData) UnmarshalJSON(data []byte) error
type BlockMapReducer ¶
type BlockMapReducer struct {
// contains filtered or unexported fields
}
BlockMapReducer implements runner.BlockMapReducer interface.
func NewBlockMapReducer ¶
func NewBlockMapReducer() *BlockMapReducer
func (*BlockMapReducer) BlockRange ¶
func (reducer *BlockMapReducer) BlockRange() (from, to uint32)
func (*BlockMapReducer) Initialise ¶
func (reducer *BlockMapReducer) Initialise(client *rpc.Client) (interface{}, error)
func (*BlockMapReducer) Map ¶
func (reducer *BlockMapReducer) Map(client *rpc.Client, emit func(interface{}) error, block *rpc.Block) error
Map in this case emits a value for every story operation by the given author.
func (*BlockMapReducer) ProcessResults ¶
func (reducer *BlockMapReducer) ProcessResults(_acc interface{}, nextBlockToProcess uint32) error
WriteResults is used to generate output for the resulting accumulator. This implementation uses a text/tabwriter to format the output.
type Data ¶
type Data struct { Config *Config `json:"config,omitempty"` State *State `json:"state,omitempty"` Acc *AccumulatorData `json:"accumulator,omitempty"` }
Click to show internal directories.
Click to hide internal directories.