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
↓ 2 callers
Function
Broadcast
Broadcast returns a StageRunner that passes a copy of each incoming payload to all specified processors and emits their outputs to the next stage.
Chapter07/pipeline/stage.go:172
↓ 2 callers
Function
ChallengeUser
ChallengeUser requests a challenge from c and prompts the user for an answer using p. If the user's answer matches the challenge then ChallengeUser re
Chapter04/captcha/captcha.go:23
↓ 2 callers
Method
Client
Client returns an http.Client instance that automatically uses the OAuth token obtained from this authentication attempt when performing outgoing http
Chapter09/oauthflow/auth/auth.go:33
↓ 2 callers
Method
Close
Close releases any resources allocated by this PageRank calculator instance.
Chapter08/pagerank/calculator.go:43
↓ 2 callers
Method
CompleteJob
CompleteJob is responsible for persisting the locally computed values after a successful execution of a distributed graph algorithm.
Chapter12/dbspgraph/job/runner.go:14
↓ 2 callers
Method
Crawl
Crawl iterates linkIt and sends each link through the crawler pipeline returning the total count of links that went through the pipeline. Calls to Cra
Chapter07/crawler/crawler.go:108
↓ 2 callers
Method
DiscardMessages
Flush drops all pending messages from the queue.
Chapter08/bspgraph/message/message.go:21
↓ 2 callers
Method
DstID
DstID returns the vertex ID that corresponds to this edge's target endpoint.
Chapter08/bspgraph/graph.go:59
↓ 2 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter10/linksrus/service/pagerank/mocks/mocks.go:34
↓ 2 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter10/linksrus/service/pagerank/mocks/mocks.go:87
↓ 2 callers
Method
Edges
(fromID, toID uuid.UUID, updatedBefore time.Time)
Chapter10/linksrus/main.go:155
↓ 2 callers
Method
Edges
(fromID, toID uuid.UUID, updatedBefore time.Time)
Chapter10/linksrus/service/pagerank/pagerank.go:26
↓ 2 callers
Function
FixedWorkerPool
FixedWorkerPool returns a StageRunner that spins up a pool containing numWorkers to process incoming payloads in parallel and emit their outputs to th
Chapter07/pipeline/stage.go:65
↓ 2 callers
Method
GetDocCount
()
Chapter09/linksrus/textindexerapi/proto/api.pb.go:242
↓ 2 callers
Method
GetPayload
()
Chapter12/dbspgraph/proto/api.pb.go:133
↓ 2 callers
Method
GetResult
()
Chapter09/linksrus/textindexerapi/proto/api.pb.go:235
↓ 2 callers
Method
GetStep
()
Chapter12/dbspgraph/proto/api.pb.go:140
↓ 2 callers
Method
Highlight
Highlight the configured search terms in the provided sentence by wrapping them in <em> tags.
Chapter10/linksrus/service/frontend/highlighter.go:35
↓ 2 callers
Method
Links
Links returns an iterator for the set of links whose IDs belong to the [fromID, toID) range and were retrieved before the provided timestamp.
Chapter06/linkgraph/graph/graph.go:77
↓ 2 callers
Method
MatchSummary
(content string)
Chapter10/linksrus/service/frontend/summarizer.go:36
↓ 2 callers
Method
Messages
Messages returns an iterator for accessing the queued messages.
Chapter08/bspgraph/message/message.go:24
↓ 2 callers
Method
Name
Name returns the service name.
Chapter10/linksrus/service/group.go:14
↓ 2 callers
Function
NewAggregator
NewAggregator returns a new Aggregator instance that queries the providers at providerAddrs and returns back the results.
Chapter11/tracing/service/aggregator.go:24
↓ 2 callers
Function
NewDetector
NewDetector returns a new Detector instance which is initialized with the default list of IPv4/IPv6 CIDR blocks that correspond to private networks ac
Chapter07/crawler/privnet/detector.go:34
↓ 2 callers
Function
NewInMemoryBleveIndexer
NewInMemoryBleveIndexer creates a text indexer that uses an in-memory bleve instance for indexing documents.
Chapter06/textindexer/store/memory/bleve.go:37
↓ 2 callers
Function
NewInMemoryGraph
NewInMemoryGraph creates a new in-memory link graph.
Chapter06/linkgraph/store/memory/memory.go:31
↓ 2 callers
Function
NewJobQueueClient
(cc *grpc.ClientConn)
Chapter12/dbspgraph/proto/api.pb.go:526
↓ 2 callers
Function
NewLinkGraphServer
NewLinkGraphServer returns a new server instance that uses the provided graph as its backing store.
Chapter09/linksrus/linkgraphapi/server.go:24
↓ 2 callers
Function
NewMasterNode
NewMasterNode creates a new master node for the PageRank calculator service.
Chapter12/linksrus/pagerank/service/master.go:76
↓ 2 callers
Function
NewMockGraphAPI
NewMockGraphAPI creates a new mock instance
Chapter10/linksrus/service/crawler/mocks/mocks.go:28
↓ 2 callers
Function
NewMockIndexAPI
NewMockIndexAPI creates a new mock instance
Chapter10/linksrus/service/crawler/mocks/mocks.go:108
↓ 2 callers
Function
NewMockRunner
NewMockRunner creates a new mock instance
Chapter12/dbspgraph/mocks/mocks_job.go:26
↓ 2 callers
Function
NewMockSerializer
NewMockSerializer creates a new mock instance
Chapter12/dbspgraph/mocks/mocks_serializer.go:25
↓ 2 callers
Function
NewOAuthFlow
NewOAuthFlow returns a Flow instance that can be used to execute a three-legged OAuth flow using the service provider from the specified configuration
Chapter09/oauthflow/auth/auth.go:65
↓ 2 callers
Function
NewQuoteServiceClient
(cc *grpc.ClientConn)
Chapter11/tracing/proto/quote.pb.go:195
↓ 2 callers
Function
NewRetryingDialer
NewRetryingDialer returns a new dialer that wraps dialFunc with a retry layer that waits between attempts using an exponential back-off algorithm. Dia
Chapter04/dialer/retrying_dialer.go:38
↓ 2 callers
Function
NewTextIndexerServer
NewTextIndexerServer creates a new server instance that uses the provided indexer as its backing store.
Chapter09/linksrus/textindexerapi/server.go:24
↓ 2 callers
Function
NewWorkerNode
NewWorkerNode creates a new worker node for the PageRank calculator service.
Chapter12/linksrus/pagerank/service/worker.go:90
↓ 2 callers
Method
RecvFromMasterChan
RecvFromMasterChan returns a channel for reading incoming payloads from the master.
Chapter12/dbspgraph/stream.go:201
↓ 2 callers
Method
RecvMsg
RecvMsg mocks base method
Chapter12/dbspgraph/mocks/mocks_api.go:68
↓ 2 callers
Method
RecvMsg
RecvMsg mocks base method
Chapter09/linksrus/textindexerapi/mocks/mock.go:182
↓ 2 callers
Function
RegisterJobQueueServer
(s *grpc.Server, srv JobQueueServer)
Chapter12/dbspgraph/proto/api.pb.go:578
↓ 2 callers
Function
RegisterLinkGraphServer
(s *grpc.Server, srv LinkGraphServer)
Chapter09/linksrus/linkgraphapi/proto/api.pb.go:452
↓ 2 callers
Function
RegisterTextIndexerServer
(s *grpc.Server, srv TextIndexerServer)
Chapter09/linksrus/textindexerapi/proto/api.pb.go:465
↓ 2 callers
Method
Reset
Reset the state of the graph by removing any existing vertices or aggregators and resetting the superstep counter.
Chapter08/bspgraph/graph.go:116
↓ 2 callers
Function
RoundtripTime
RoundtripTime uses the ping command to measure the RTT to host.
Chapter04/pinger/pinger.go:16
↓ 2 callers
Method
Run
Run implements service.Service
Chapter10/linksrus/service/pagerank/pagerank.go:116
↓ 2 callers
Method
Send
(*WorkerPayload)
Chapter12/dbspgraph/proto/api.pb.go:540
↓ 2 callers
Method
Send
(*Link)
Chapter09/linksrus/linkgraphapi/proto/api.pb.go:501
↓ 2 callers
Method
SendMsg
SendMsg mocks base method
Chapter12/dbspgraph/mocks/mocks_api.go:110
↓ 2 callers
Method
SendToWorkerChan
SendToWorkerChan returns a channel for sending master payloads to the worker.
Chapter12/dbspgraph/stream.go:102
↓ 2 callers
Method
Serialize
Serialize encodes the given value into an any.Any protobuf message.
Chapter12/dbspgraph/config.go:20
↓ 2 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/aggregator.go:68
↓ 2 callers
Method
SetDisconnectCallback
SetDisconnectCallback registers a callback which will be invoked when the remote worker disconnects.
Chapter12/dbspgraph/stream.go:108
↓ 2 callers
Method
SetExecutorFactory
SetExecutorFactory configures the calculator to use the a custom executor factory when AssignColors is invoked.
Chapter08/color/color.go:46
↓ 2 callers
Method
SetGraph
SetGraph configures the test-suite to run all tests against g.
Chapter06/linkgraph/graph/graphtest/suite.go:23
↓ 2 callers
Method
SetIndexer
SetIndexer configures the test-suite to run all tests against idx.
Chapter06/textindexer/index/indextest/suite.go:20
↓ 2 callers
Method
StartJob
StartJob initializes the underlying bspgraph.Graph instance and invokes the provided ExecutorFactory to create an executor for the graph supersteps.
Chapter12/dbspgraph/job/runner.go:10
↓ 2 callers
Method
UpdateScore
(linkID uuid.UUID, score float64)
Chapter10/linksrus/main.go:182
↓ 2 callers
Method
UpsertLink
(link *graph.Link)
Chapter10/linksrus/service/crawler/crawler.go:26
↓ 2 callers
Function
assertExtractedContent
(c *gc.C, content, expTitle, expText string)
Chapter07/crawler/text_extractor_test.go:33
↓ 2 callers
Function
assertNoColorConflictWithNeighbors
(c *gc.C, adjMap map[string][]string, colorMap map[string]int)
Chapter08/color/color_test.go:116
↓ 2 callers
Method
callService
callService performs an RPC and decodes the response into res.
Chapter04/retail/retail.go:79
↓ 2 callers
Function
copyDoc
(d *index.Document)
Chapter06/textindexer/store/memory/bleve.go:144
↓ 2 callers
Function
doServe
(ctx context.Context, srv proto.QuoteServiceServer, tracer opentracing.Tracer)
Chapter11/tracing/service/provider.go:45
↓ 2 callers
Function
drainAndClose
(r io.ReadCloser)
Chapter04/retail/retail.go:118
↓ 2 callers
Function
ensureIndex
(es *elasticsearch.Client)
Chapter06/textindexer/store/es/es.go:246
↓ 2 callers
Function
expBackoff
expBackoff returns the time we need to wait after the i_th attempt. It is calculated using the following formula: min(pow(4ms, attempt) + jitter, max
Chapter04/dialer/retrying_dialer.go:75
↓ 2 callers
Method
findByID
findByID looks up a document by its link UUID expressed as a string.
Chapter06/textindexer/store/memory/bleve.go:88
↓ 2 callers
Method
flushDB
(c *gc.C)
Chapter06/linkgraph/store/cdb/cdb_test.go:44
↓ 2 callers
Method
iteratePartitionedEdges
(c *gc.C, numPartitions int)
Chapter06/linkgraph/graph/graphtest/suite.go:394
↓ 2 callers
Method
iteratePartitionedLinks
(c *gc.C, numPartitions int)
Chapter06/linkgraph/graph/graphtest/suite.go:202
↓ 2 callers
Function
makeBleveDoc
(d *index.Document)
Chapter06/textindexer/store/memory/bleve.go:150
↓ 2 callers
Function
makeOAuthServerHandler
(c *gc.C, nonceMutatorFn func(string) string)
Chapter09/oauthflow/auth/auth_test.go:108
↓ 2 callers
Function
mapEsDoc
(d *esDoc)
Chapter06/textindexer/store/es/es.go:305
↓ 2 callers
Function
mustCreateTestServer
(c *gc.C)
Chapter07/crawler/crawler_integration_test.go:128
↓ 2 callers
Function
newGraphUpdater
(updater Graph)
Chapter07/crawler/graph_updater.go:15
↓ 2 callers
Function
newLinkExtractor
(netDetector PrivateNetworkDetector)
Chapter07/crawler/link_extractor.go:22
↓ 2 callers
Function
newLinkFetcher
(urlGetter URLGetter, netDetector PrivateNetworkDetector)
Chapter07/crawler/link_fetcher.go:19
↓ 2 callers
Function
newMatchHighlighter
newMatchHighlighter returns a matchHighlighter instance that can highlight the specified searchTerms in blocks of text.
Chapter10/linksrus/service/frontend/highlighter.go:17
↓ 2 callers
Function
newMatchSummarizer
(searchTerms string, maxSummaryLen int)
Chapter10/linksrus/service/frontend/summarizer.go:29
↓ 2 callers
Function
newTextExtractor
()
Chapter07/crawler/text_extractor.go:23
↓ 2 callers
Function
newTextIndexer
(indexer Indexer)
Chapter07/crawler/text_indexer.go:15
↓ 2 callers
Function
newWorkerPool
newWorkerPool creates a new worker pool instance.
Chapter12/dbspgraph/worker_pool.go:26
↓ 2 callers
Method
notifyOfPoolMembershipChange
()
Chapter12/dbspgraph/worker_pool.go:85
↓ 2 callers
Method
partitionRange
(c *gc.C, partition, numPartitions int)
Chapter06/linkgraph/graph/graphtest/suite.go:490
↓ 2 callers
Function
residualOutputAccName
residualOutputAccName returns the name of the accumulator where the residual PageRank scores for the specified superstep are to be written to.
Chapter08/pagerank/calculator.go:118
↓ 2 callers
Method
run
(ctx context.Context, maxSteps int)
Chapter08/bspgraph/executor.go:83
↓ 2 callers
Function
scanRune
(data []byte)
Chapter10/linksrus/service/frontend/summarizer.go:159
↓ 2 callers
Function
serializeAggregatorValues
(g *bspgraph.Graph, serializer Serializer, serializeDeltas bool)
Chapter12/dbspgraph/executor.go:224
↓ 2 callers
Method
setupGraph
(c *gc.C, adjMap map[string][]string, preColoredVerts map[string]int)
Chapter08/color/color_test.go:81
↓ 2 callers
Function
spinUpTestServer
(t *testing.T, res map[string]interface{})
Chapter04/retail/retail_test.go:30
↓ 2 callers
Method
testConcurrentAccess
(a aggregator, values []interface{})
Chapter08/bspgraph/aggregator/accumulator_test.go:57
↓ 2 callers
Function
timeToProto
(t time.Time)
Chapter09/linksrus/textindexerapi/server.go:116
↓ 2 callers
Function
tryEmitError
(errCh chan<- error, err error)
Chapter08/bspgraph/graph.go:301
↓ 2 callers
Function
vatInclusivePrice
vatInclusivePrice applies a vat rate to a price and returns the result.
Chapter04/retail/retail.go:74
↓ 1 callers
Method
AddToDepList
(id string)
Chapter04/dependency/dependency.go:105
↓ 1 callers
Method
AddToUncheckedList
(id string)
Chapter04/dependency/dependency.go:110
↓ 1 callers
Method
AddUndirectedEdge
AddUndirectedEdge creates an un-directed edge from srcID to dstID.
Chapter08/color/color.go:61
↓ 1 callers
Method
Aggregate
(interface{})
Chapter08/bspgraph/aggregator/accumulator_test.go:16
← previous
next →
201–300 of 1,360, ranked by callers