Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PacktPublishing/Hands-On-Software-Engineering-with-Golang
/ functions
Functions
1,360 in github.com/PacktPublishing/Hands-On-Software-Engineering-with-Golang
⨍
Functions
1,360
◇
Types & classes
345
↓ 111 callers
Method
Close
Cleanly shutdown the queue.
Chapter08/bspgraph/message/message.go:12
↓ 78 callers
Method
Call
(req map[string]interface{})
Chapter04/retail/retail.go:16
↓ 63 callers
Method
String
()
Chapter12/dbspgraph/proto/api.pb.go:353
↓ 52 callers
Method
Error
Error return the last error observed by the source.
Chapter07/pipeline/interfaces.go:79
↓ 45 callers
Method
Wait
Wait enters the barrier for the specified Step type and blocks until NotifyWorkers is invoked. The method returns back the Step message passed to Noti
Chapter12/dbspgraph/barrier.go:83
↓ 40 callers
Method
Next
Next fetches the next payload from the source. If no more items are available or an error occurs, calls to Next return false.
Chapter07/pipeline/interfaces.go:73
↓ 33 callers
Method
String
()
Chapter07/pipeline/pipeline_test.go:170
↓ 23 callers
Method
Get
(url string)
Chapter07/crawler/crawler.go:18
↓ 21 callers
Method
UpsertLink
UpsertLink creates a new link or updates an existing link.
Chapter06/linkgraph/graph/graph.go:70
↓ 19 callers
Method
Close
Close the iterator and release any allocated resources.
Chapter06/textindexer/index/indexer.go:28
↓ 17 callers
Method
Process
Process operates on the input payload and returns back a new payload to be forwarded to the next pipeline stage. Processors may also opt to prevent th
Chapter07/pipeline/interfaces.go:23
↓ 17 callers
Method
UpsertLink
UpsertLink inserts or updates a link.
Chapter09/linksrus/linkgraphapi/proto/api.pb.go:306
↓ 16 callers
Method
Aggregator
Aggregator returns the aggregator with the specified name or nil if the aggregator does not exist
Chapter08/bspgraph/graph.go:175
↓ 16 callers
Method
Link
Link returns the currently fetched link object.
Chapter06/linkgraph/graph/graph.go:27
↓ 16 callers
Method
Serve
Serve listens for incoming connections on a random open port until ctx expires. It returns back the address that the server is listening on.
Chapter11/tracing/service/provider.go:41
↓ 16 callers
Method
String
()
Chapter11/tracing/proto/quote.pb.go:114
↓ 15 callers
Method
ID
ID returns the vertex ID.
Chapter08/bspgraph/graph.go:36
↓ 14 callers
Method
Index
Index inserts a new document to the index or updates the index entry for and existing document.
Chapter06/textindexer/index/indexer.go:10
↓ 13 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter07/crawler/mocks/mocks.go:112
↓ 13 callers
Method
Superstep
Superstep returns the current superstep value.
Chapter08/bspgraph/graph.go:235
↓ 13 callers
Function
mustEncodeTimestamp
(c *gc.C, t time.Time)
Chapter09/linksrus/linkgraphapi/package_test.go:17
↓ 12 callers
Method
Edge
Edge returns the currently fetched edge objects.
Chapter06/linkgraph/graph/graph.go:35
↓ 12 callers
Method
IsPrivate
(host string)
Chapter07/crawler/crawler.go:24
↓ 12 callers
Method
Value
Value returns the value associated with this edge.
Chapter08/bspgraph/graph.go:62
↓ 12 callers
Function
newJobRunner
(c *gc.C, maxSupersteps int, isMaster bool, logger *logrus.Entry)
Chapter12/dbspgraph/integration_test.go:399
↓ 11 callers
Method
Notify
Notify passes a Step message broadcasted by the master to the worker waiting on the barrier specified by the Step type.
Chapter12/dbspgraph/barrier.go:157
↓ 11 callers
Method
Run
Run executes the service and blocks until the context gets cancelled or an error occurs.
Chapter10/linksrus/service/group.go:18
↓ 11 callers
Method
UpsertEdge
UpsertEdge creates a new edge or updates an existing edge.
Chapter06/linkgraph/graph/graph.go:80
↓ 11 callers
Method
UpsertEdge
UpsertEdge inserts or updates an edge.
Chapter09/linksrus/linkgraphapi/proto/api.pb.go:308
↓ 11 callers
Function
uuidFromBytes
(b []byte)
Chapter09/linksrus/linkgraphapi/server.go:174
↓ 10 callers
Method
AddVertex
AddVertex inserts a new vertex with the specified id and initial value into the graph. If the vertex already exists, AddVertex will just overwrite its
Chapter08/bspgraph/graph.go:136
↓ 10 callers
Method
Dial
Dial establishes a connection to the master node.
Chapter12/dbspgraph/worker.go:36
↓ 10 callers
Method
Graph
Graph returns the underlying bspgraph.Graph instance.
Chapter08/color/color.go:40
↓ 10 callers
Method
Index
Index inserts a new document to the index or updates the index entry for and existing document.
Chapter09/linksrus/textindexerapi/proto/api.pb.go:369
↓ 10 callers
Function
New
New returns a new pipeline instance where input payloads will traverse each one of the specified stages.
Chapter07/pipeline/pipeline.go:36
↓ 10 callers
Function
NewGraph
NewGraph creates a new Graph instance using the specified configuration. It is important for callers to invoke Close() on the returned graph instance
Chapter08/bspgraph/graph.go:90
↓ 10 callers
Method
Set
Set the aggregator to the specified value.
Chapter08/bspgraph/interfaces.go:14
↓ 10 callers
Method
Vertices
Vertices returns the graph vertices as a map where the key is the vertex ID.
Chapter08/bspgraph/graph.go:131
↓ 10 callers
Method
WaitForWorkers
WaitForWorkers blocks until all workers enter the barrier for stepType (or the context associated with the barrier expires) and returns back the Step
Chapter12/dbspgraph/barrier.go:42
↓ 9 callers
Method
FindByID
FindByID looks up a document by its link ID.
Chapter06/textindexer/index/indexer.go:13
↓ 9 callers
Method
Message
Message returns the message currently pointed to by the iterator.
Chapter08/bspgraph/message/message.go:35
↓ 9 callers
Function
NewLinkGraphClient
NewLinkGraphClient returns a new client instance that implements a subset of the graph.Graph interface by delegating methods to a graph instance expos
Chapter09/linksrus/linkgraphapi/client.go:26
↓ 9 callers
Function
NewMockPrivateNetworkDetector
NewMockPrivateNetworkDetector creates a new mock instance
Chapter07/crawler/mocks/mocks.go:67
↓ 9 callers
Method
Search
Search the index for a particular query and return back a result iterator.
Chapter06/textindexer/index/indexer.go:17
↓ 9 callers
Method
SendMessage
SendMessage attempts to deliver a message to the vertex with the specified destination ID. Messages are queued for delivery and will be processed by r
Chapter08/bspgraph/graph.go:213
↓ 9 callers
Method
Validate
Validate the config options.
Chapter12/dbspgraph/config.go:44
↓ 9 callers
Function
stringPayloads
(numValues int)
Chapter07/pipeline/pipeline_test.go:172
↓ 8 callers
Method
AddEdge
AddEdge inserts a directed edge from src to destination and annotates it with the specified initValue. By design, edges are owned by the source vertic
Chapter08/bspgraph/graph.go:157
↓ 8 callers
Method
Aggregate
Aggregate updates the aggregator's value based on the provided value.
Chapter08/bspgraph/interfaces.go:20
↓ 8 callers
Method
Close
Close shuts down the worker.
Chapter12/dbspgraph/worker.go:55
↓ 8 callers
Method
Dial
Dial a remote host.
Chapter04/dialer/retrying_dialer.go:52
↓ 8 callers
Method
Next
Next advances the iterator so that the next message can be retrieved via a call to Message(). If no more messages are available or an error occurs, Ne
Chapter08/bspgraph/message/message.go:32
↓ 8 callers
Method
NotifyWorkers
NotifyWorkers broadcasts the provided Step message to all workers waiting on the barrier for the specified message type.
Chapter12/dbspgraph/barrier.go:63
↓ 8 callers
Method
Run
Run implements the processing logic for this stage by reading incoming Payloads from an input channel, processing them and outputting the results to a
Chapter07/pipeline/interfaces.go:65
↓ 8 callers
Method
RunJob
RunJob waits for a new job announcement from the master and coordinates its execution with the master until it either completes or is aborted due to a
Chapter12/dbspgraph/worker.go:67
↓ 8 callers
Method
RunToCompletion
RunToCompletion keeps executing supersteps until the context expires, an error occurs or one of the Pre/PostStepKeepRunning callbacks specified at con
Chapter08/bspgraph/executor.go:62
↓ 8 callers
Method
StageIndex
StageIndex returns the position of this stage in the pipeline.
Chapter07/pipeline/interfaces.go:41
↓ 8 callers
Method
validate
()
Chapter10/linksrus/service/crawler/crawler.go:75
↓ 7 callers
Method
Close
Close disconnects any connected workers and shuts down the gRPC server.
Chapter12/dbspgraph/master.go:68
↓ 7 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter10/linksrus/service/pagerank/mocks/mock_iterator.go:32
↓ 7 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter10/linksrus/service/pagerank/mocks/mock_iterator.go:111
↓ 7 callers
Function
NewMaster
NewMaster creates a new Master instance with the specified configuration.
Chapter12/dbspgraph/master.go:36
↓ 7 callers
Function
NewTextIndexerClient
NewTextIndexerClient returns a new client instance that implements a subset of the index.Indexer interface by delegating methods to an indexer instanc
Chapter09/linksrus/textindexerapi/client.go:26
↓ 7 callers
Function
NewWorker
NewWorker creates a new Worker instance with the specified configuration.
Chapter12/dbspgraph/worker.go:27
↓ 7 callers
Method
RegisterAggregator
RegisterAggregator adds an aggregator with the specified name into the graph.
Chapter08/bspgraph/graph.go:171
↓ 7 callers
Method
Search
Search the index for a particular query and stream the results back to the client. The first response will include the total result count while all su
Chapter09/linksrus/textindexerapi/proto/api.pb.go:373
↓ 7 callers
Method
SetValue
SetValue sets the value associated with this edge.
Chapter08/bspgraph/graph.go:65
↓ 7 callers
Method
Start
Start listening on the configured address for incoming worker connections. Calls to Start are non-blocking. The caller must invoke the Close method to
Chapter12/dbspgraph/master.go:50
↓ 7 callers
Method
String
()
Chapter07/crawler/text_indexer_test.go:74
↓ 7 callers
Method
UpdateScore
UpdateScore updates the PageRank score for a document with the specified link ID. If no such document exists, a placeholder document with the provided
Chapter06/textindexer/index/indexer.go:22
↓ 7 callers
Method
UpdateScore
UpdateScore updates the PageRank score for a document with the specified link ID.
Chapter09/linksrus/textindexerapi/proto/api.pb.go:376
↓ 7 callers
Function
assertResolvedURL
(c *gc.C, target, base, exp string)
Chapter07/crawler/link_extractor_test.go:70
↓ 7 callers
Function
newMasterStepBarrier
newMasterStepBarrier creates a new barrier instance for a master node that will be accessed by the specified number of remote workers.
Chapter12/dbspgraph/barrier.go:20
↓ 7 callers
Method
validate
()
Chapter10/linksrus/service/pagerank/pagerank.go:63
↓ 6 callers
Method
Close
Close releases any resources associated with the graph.
Chapter08/bspgraph/graph.go:107
↓ 6 callers
Method
Edges
Edges returns an iterator for the set of edges whose source vertex IDs belong to the [fromID, toID) range and were updated before the provided timesta
Chapter06/linkgraph/graph/graph.go:85
↓ 6 callers
Method
Edges
Edges streams the set of edges in the specified ID range.
Chapter09/linksrus/linkgraphapi/proto/api.pb.go:312
↓ 6 callers
Method
Executor
Executor creates and return a bspgraph.Executor for running the PageRank algorithm once the graph layout has been properly set up.
Chapter08/pagerank/calculator.go:75
↓ 6 callers
Function
NewMockURLGetter
NewMockURLGetter creates a new mock instance
Chapter07/crawler/mocks/mocks.go:29
↓ 6 callers
Function
NewRange
NewRange creates a new range [start, end) and splits it into the provided number of partitions.
Chapter12/dbspgraph/partition/range.go:31
↓ 6 callers
Method
Recv
()
Chapter09/linksrus/linkgraphapi/proto/api.pb.go:360
↓ 6 callers
Method
RemoveStaleEdges
RemoveStaleEdges removes any edge that originates from the specified link ID and was updated before the specified timestamp.
Chapter09/linksrus/linkgraphapi/proto/api.pb.go:315
↓ 6 callers
Method
Reset
()
Chapter12/dbspgraph/proto/api.pb.go:352
↓ 6 callers
Method
RunJob
RunJob creates a new job and coordinates its execution until the job completes, the context expires or some error occurs. The minWorkers parameter def
Chapter12/dbspgraph/master.go:90
↓ 6 callers
Method
assertExtractedLinks
(c *gc.C, url, content string, expLinks []string, expNoFollowLinks []string)
Chapter07/crawler/link_extractor_test.go:215
↓ 6 callers
Method
fetchLink
(c *gc.C, url string)
Chapter07/crawler/link_fetcher_test.go:110
↓ 6 callers
Method
findFreePort
(c *gc.C)
Chapter12/dbspgraph/integration_test.go:375
↓ 6 callers
Function
iterateDocs
(c *gc.C, it index.Iterator)
Chapter06/textindexer/index/indextest/suite.go:292
↓ 6 callers
Function
loadFloat64
(v *float64)
Chapter08/bspgraph/aggregator/accumulator.go:77
↓ 6 callers
Function
newRemoteWorkerStream
newRemoteWorkerStream creates a stream abstraction for interacting with a remote worker instance.
Chapter12/dbspgraph/stream.go:36
↓ 6 callers
Function
timeToProto
(t time.Time)
Chapter09/linksrus/linkgraphapi/server.go:184
↓ 5 callers
Method
AddVertex
AddVertex inserts a new vertex with the specified ID into the graph.
Chapter08/color/color.go:51
↓ 5 callers
Method
AddWorker
AddWorker adds a new worker to the pool.
Chapter12/dbspgraph/worker_pool.go:49
↓ 5 callers
Method
BroadcastToNeighbors
BroadcastToNeighbors is a helper function that broadcasts a single message to each neighbor of a particular vertex. Messages are queued for delivery a
Chapter08/bspgraph/graph.go:189
↓ 5 callers
Method
Context
Context mocks base method
Chapter12/dbspgraph/mocks/mocks_api.go:39
↓ 5 callers
Function
DetectFromSRVRecords
DetectFromSRVRecords returns a PartitionDetector implementation that extracts the current partition name from the current host name and attempts to de
Chapter10/linksrus/partition/detector.go:42
↓ 5 callers
Method
Document
Document returns the current document from the result set.
Chapter06/textindexer/index/indexer.go:38
↓ 5 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter04/dependency/mock/dependency.go:32
↓ 5 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter10/linksrus/service/frontend/mocks/mock_indexer.go:32
↓ 5 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter10/linksrus/service/frontend/mocks/mocks.go:33
next →
1–100 of 1,360, ranked by callers