Skip to content

Commit

Permalink
Refactor: CreateResourceIndex -> ResourceIndexCreator
Browse files Browse the repository at this point in the history
  • Loading branch information
samuell committed Apr 10, 2017
1 parent 7ac2df1 commit cceb61f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func main() {
net.AddProcess(aggregator)

// Create an subject-indexed "index" of all triples
indexCreator := NewCreateResourceIndex()
indexCreator := NewResourceIndexCreator()
net.AddProcess(indexCreator)

// Fan-out the triple index to the converter and serializer
Expand Down
8 changes: 4 additions & 4 deletions residxcreator.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package main

type CreateResourceIndex struct {
type ResourceIndexCreator struct {
In chan *TripleAggregate
Out chan *map[string]*TripleAggregate
}

func NewCreateResourceIndex() *CreateResourceIndex {
return &CreateResourceIndex{
func NewResourceIndexCreator() *ResourceIndexCreator {
return &ResourceIndexCreator{
In: make(chan *TripleAggregate, BUFSIZE),
Out: make(chan *map[string]*TripleAggregate),
}
}

func (p *CreateResourceIndex) Run() {
func (p *ResourceIndexCreator) Run() {
defer close(p.Out)

idx := make(map[string]*TripleAggregate)
Expand Down

0 comments on commit cceb61f

Please sign in to comment.