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
↓ 5 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter09/linksrus/linkgraphapi/mocks/mock.go:36
↓ 5 callers
Function
FIFO
FIFO returns a StageRunner that processes incoming payloads in a first-in first-out fashion. Each input is passed to the specified processor and its o
Chapter07/pipeline/stage.go:17
↓ 5 callers
Method
HandleSendRecv
HandleSendRecv asynchronously handles both the send and receiving ends of a remotely connected worker. Calls to HandleSendRecv block until the
Chapter12/dbspgraph/stream.go:47
↓ 5 callers
Method
Links
Links streams the set of links in the specified ID range.
Chapter09/linksrus/linkgraphapi/proto/api.pb.go:310
↓ 5 callers
Function
NewExecutor
NewExecutor returns an Executor instance for graph g that invokes the provided list of callbacks inside each execution loop.
Chapter08/bspgraph/executor.go:50
↓ 5 callers
Function
NewMockLinkGraphClient
NewMockLinkGraphClient creates a new mock instance
Chapter09/linksrus/linkgraphapi/mocks/mock.go:29
↓ 5 callers
Method
Output
Output returns a channel for writing the output payloads for a stage.
Chapter07/pipeline/interfaces.go:47
↓ 5 callers
Method
Recv
()
Chapter09/linksrus/textindexerapi/proto/api.pb.go:412
↓ 5 callers
Method
Scores
Scores invokes the provided visitor function for each vertex in the graph.
Chapter08/pagerank/calculator.go:106
↓ 5 callers
Method
Search
(query index.Query)
Chapter10/linksrus/service/frontend/frontend.go:42
↓ 5 callers
Function
assertAllProcessed
(c *gc.C, payloads []pipeline.Payload)
Chapter07/pipeline/pipeline_test.go:86
↓ 5 callers
Function
newRemoteMasterStream
newRemoteMasterStream creates a stream abstraction for interacting with a master.
Chapter12/dbspgraph/stream.go:140
↓ 5 callers
Function
newWorkerStepBarrier
newWorkerStepBarrier creates a new barrier instance for a worker node that communicates with a master barrier instance over the provided channels.
Chapter12/dbspgraph/barrier.go:115
↓ 5 callers
Method
setupService
(c *gc.C, ctrl *gomock.Controller)
Chapter10/linksrus/service/frontend/frontend_test.go:145
↓ 4 callers
Method
Close
Close cleans up any allocated graph resources.
Chapter08/shortestpath/path.go:39
↓ 4 callers
Method
DependencyType
DependencyType returns the type of a particular dependency.
Chapter04/dependency/dependency.go:22
↓ 4 callers
Method
FindLink
FindLink looks up a link by its ID.
Chapter06/linkgraph/graph/graph.go:73
↓ 4 callers
Method
Get
Get the current aggregator value.
Chapter08/bspgraph/interfaces.go:17
↓ 4 callers
Method
GetDoc
()
Chapter09/linksrus/textindexerapi/proto/api.pb.go:249
↓ 4 callers
Method
GetQuote
(ctx context.Context, in *QuotesRequest, opts ...grpc.CallOption)
Chapter11/tracing/proto/quote.pb.go:188
↓ 4 callers
Method
Input
Input returns a channel for reading the input payloads for a stage.
Chapter07/pipeline/interfaces.go:44
↓ 4 callers
Method
Links
(fromID, toID uuid.UUID, retrievedBefore time.Time)
Chapter10/linksrus/main.go:154
↓ 4 callers
Method
Links
(fromID, toID uuid.UUID, retrievedBefore time.Time)
Chapter10/linksrus/service/crawler/crawler.go:29
↓ 4 callers
Method
MarkAsProcessed
MarkAsProcessed is invoked by the pipeline when the Payload either reaches the pipeline sink or it gets discarded by one of the pipeline stages.
Chapter07/pipeline/interfaces.go:13
↓ 4 callers
Function
NewRange
NewRange creates a new range [start, end) and splits it into the provided number of partitions.
Chapter10/linksrus/partition/range.go:30
↓ 4 callers
Function
NewService
NewService creates a new PageRank calculator service instance with the specified config.
Chapter10/linksrus/service/pagerank/pagerank.go:96
↓ 4 callers
Method
PartitionExtents
PartitionExtents returns the [start, end) range for the requested partition.
Chapter12/dbspgraph/partition/range.go:71
↓ 4 callers
Method
PartitionExtents
PartitionExtents returns the [start, end) range for the requested partition.
Chapter10/linksrus/partition/range.go:65
↓ 4 callers
Method
PartitionForID
PartitionForID returns the partition index that the provided ID belongs to.
Chapter12/dbspgraph/partition/range.go:83
↓ 4 callers
Method
PartitionInfo
()
Chapter10/linksrus/partition/detector.go:26
↓ 4 callers
Method
PendingMessages
PendingMessages returns true if the queue contains any messages.
Chapter08/bspgraph/message/message.go:18
↓ 4 callers
Method
RecvMsg
RecvMsg mocks base method
Chapter09/linksrus/linkgraphapi/mocks/mock.go:222
↓ 4 callers
Method
ReserveWorkers
ReserveWorkers blocks until either the context gets cancelled or at least minWorkers are available in the pool. In the latter case, the workers are re
Chapter12/dbspgraph/worker_pool.go:102
↓ 4 callers
Method
SendMsg
SendMsg mocks base method
Chapter09/linksrus/linkgraphapi/mocks/mock.go:236
↓ 4 callers
Method
SendToMasterChan
SendToMasterChan returns a channel for sending worker payloads to the master.
Chapter12/dbspgraph/stream.go:206
↓ 4 callers
Method
String
()
Chapter09/linksrus/linkgraphapi/proto/api.pb.go:40
↓ 4 callers
Method
TotalCount
TotalCount returns the approximate number of search results.
Chapter06/textindexer/index/indexer.go:41
↓ 4 callers
Method
assertPageRankScores
(c *gc.C, spec spec)
Chapter08/pagerank/calculator_test.go:188
↓ 4 callers
Function
execFixedSteps
(g *bspgraph.Graph, numSteps int)
Chapter08/bspgraph/graph_test.go:241
↓ 4 callers
Function
makeResponse
(status int, body, contentType string)
Chapter07/crawler/link_fetcher_test.go:122
↓ 4 callers
Function
maybeEmitError
maybeEmitError attempts to queue err to a buffered error channel. If the channel is full, the error is dropped.
Chapter07/pipeline/pipeline.go:161
↓ 4 callers
Method
mockIterator
(ctrl *gomock.Controller, numResults int)
Chapter10/linksrus/service/frontend/frontend_test.go:160
↓ 4 callers
Method
partitionedEdgeIterator
(c *gc.C, partition, numPartitions int, updatedBefore time.Time)
Chapter06/linkgraph/graph/graphtest/suite.go:485
↓ 4 callers
Method
partitionedLinkIterator
(c *gc.C, partition, numPartitions int, accessedBefore time.Time)
Chapter06/linkgraph/graph/graphtest/suite.go:480
↓ 4 callers
Function
unmarshalResponse
(res *esapi.Response, to interface{})
Chapter06/textindexer/store/es/es.go:290
↓ 3 callers
Method
AbortJob
AbortJob is responsible for cleaning up the underlying graph after an unsuccessful execution of a distributed graph algorithm.
Chapter12/dbspgraph/job/runner.go:18
↓ 3 callers
Method
Authenticate
Authenticate starts a new three-legged OAuth flow. It returns back a URL that the client must to visit to authorize access. Once the user has complete
Chapter09/oauthflow/auth/auth.go:112
↓ 3 callers
Method
CloseSend
CloseSend mocks base method
Chapter09/linksrus/linkgraphapi/mocks/mock.go:164
↓ 3 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter12/dbspgraph/mocks/mocks_api.go:34
↓ 3 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter10/linksrus/service/crawler/mocks/mock_iterator.go:32
↓ 3 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
Chapter09/linksrus/textindexerapi/mocks/mock.go:36
↓ 3 callers
Method
Enqueue
Enqueue inserts a message to the end of the queue.
Chapter08/bspgraph/message/message.go:15
↓ 3 callers
Method
Freeze
Freeze marks the vertex as inactive. Inactive vertices will not be processed in the following supersteps unless they receive a message in which case t
Chapter08/bspgraph/graph.go:44
↓ 3 callers
Method
GetPayload
()
Chapter12/dbspgraph/proto/api.pb.go:222
↓ 3 callers
Method
Header
Header mocks base method
Chapter09/linksrus/linkgraphapi/mocks/mock.go:192
↓ 3 callers
Method
JobStream
JobStream establishes a bi-directional connection between a worker and a master. The master eventually broadcasts a new job to the connected workers a
Chapter12/dbspgraph/proto/api.pb.go:519
↓ 3 callers
Method
ListDependencies
ListDependencies returns the list of direct dependency IDs for a particular project ID or an error if a non-project ID argument is provided.
Chapter04/dependency/dependency.go:19
↓ 3 callers
Function
MustGetTracer
MustGetTracer obtains and returns a new Jaeger tracer or panics if any error occurs.
Chapter11/tracing/tracer/tracer.go:40
↓ 3 callers
Function
NewCalculator
NewCalculator returns a new Calculator instance using the provided config options.
Chapter08/pagerank/calculator.go:22
↓ 3 callers
Function
NewCockroachDbGraph
NewCockroachDbGraph returns a CockroachDbGraph instance that connects to the cockroachdb instance specified by dsn.
Chapter06/linkgraph/store/cdb/cdb.go:42
↓ 3 callers
Function
NewDetectorFromCIDRs
NewDetectorFromCIDRs returns a new Detector instance which is initialized with the specified list of privateNetworkCIDRs.
Chapter07/crawler/privnet/detector.go:40
↓ 3 callers
Function
NewElasticSearchIndexer
NewElasticSearchIndexer creates a text indexer that uses an in-memory bleve instance for indexing documents.
Chapter06/textindexer/store/es/es.go:93
↓ 3 callers
Function
NewFullRange
NewFullRange creates a new range that uses the full UUID value space and splits it into the provided number of partitions.
Chapter12/dbspgraph/partition/range.go:21
↓ 3 callers
Function
NewFullRange
NewFullRange creates a new range that uses the full UUID value space and splits it into the provided number of partitions.
Chapter10/linksrus/partition/range.go:20
↓ 3 callers
Function
NewMockGraphAPI
NewMockGraphAPI creates a new mock instance
Chapter10/linksrus/service/pagerank/mocks/mocks.go:27
↓ 3 callers
Function
NewMockIndexAPI
NewMockIndexAPI creates a new mock instance
Chapter10/linksrus/service/pagerank/mocks/mocks.go:80
↓ 3 callers
Function
NewMockJobQueue_JobStreamServer
NewMockJobQueue_JobStreamServer creates a new mock instance
Chapter12/dbspgraph/mocks/mocks_api.go:27
↓ 3 callers
Function
NewMockTextIndexerClient
NewMockTextIndexerClient creates a new mock instance
Chapter09/linksrus/textindexerapi/mocks/mock.go:29
↓ 3 callers
Function
NewService
NewService creates a new front-end service instance with the specified config.
Chapter10/linksrus/service/frontend/frontend.go:103
↓ 3 callers
Function
NewService
NewService creates a new crawler service instance with the specified config.
Chapter10/linksrus/service/crawler/crawler.go:117
↓ 3 callers
Method
PriceForItem
PriceForItem calculates the VAT-inclusive retail price of itemUUID with the currently applicable VAT rates.
Chapter04/retail/retail.go:36
↓ 3 callers
Method
Recv
()
Chapter12/dbspgraph/proto/api.pb.go:541
↓ 3 callers
Method
RecvFromWorkerChan
RecvFromWorkerChan returns a channel for reading incoming payloads from the worker.
Chapter12/dbspgraph/stream.go:97
↓ 3 callers
Method
RegisterRelayer
RegisterRelayer configures a Relayer that the graph will invoke when attempting to deliver a message to a vertex that is not known locally but could p
Chapter08/bspgraph/graph.go:184
↓ 3 callers
Method
RemoveStaleEdges
RemoveStaleEdges removes any edge that originates from the specified link ID and was updated before the specified timestamp.
Chapter06/linkgraph/graph/graph.go:89
↓ 3 callers
Method
Run
Run executes all Service instances in the group using the provided context. Calls to Run block until all services have completed executing either beca
Chapter10/linksrus/service/group.go:27
↓ 3 callers
Method
RunSteps
RunSteps executes at most numStep supersteps unless the context expires, an error occurs or one of the Pre/PostStepKeepRunning callbacks specified at
Chapter08/bspgraph/executor.go:69
↓ 3 callers
Method
SendMsg
SendMsg mocks base method
Chapter09/linksrus/textindexerapi/mocks/mock.go:196
↓ 3 callers
Method
Unserialize
Unserialize decodes the given any.Any protobuf value.
Chapter12/dbspgraph/config.go:23
↓ 3 callers
Method
UpdateScore
(linkID uuid.UUID, score float64)
Chapter10/linksrus/service/pagerank/pagerank.go:32
↓ 3 callers
Function
WithPinnedCertVerification
WithPinnedCertVerification returns a TLS dialer function which checks that the remote server provides a certificate whose SHA256 fingerprint matches t
Chapter09/pincert/dialer/pinned_cert.go:23
↓ 3 callers
Method
asMessage
(id string)
Chapter08/color/color.go:108
↓ 3 callers
Method
assertSearchResultsMatchList
(c *gc.C, stream proto.TextIndexer_SearchClient, expTotalCount int, expIDList []uuid.UUID)
Chapter09/linksrus/textindexerapi/server_test.go:184
↓ 3 callers
Method
indexDocs
(c *gc.C, count int)
Chapter09/linksrus/textindexerapi/server_test.go:211
↓ 3 callers
Function
mustDecodeTimestamp
(c *gc.C, ts *timestamp.Timestamp)
Chapter09/linksrus/linkgraphapi/package_test.go:23
↓ 3 callers
Function
mustEncodeTimestamp
(c *gc.C, t time.Time)
Chapter09/linksrus/textindexerapi/package_test.go:17
↓ 3 callers
Function
mustGetLinkIterator
(c *gc.C, g graph.Graph)
Chapter07/crawler/crawler_integration_test.go:140
↓ 3 callers
Function
resolveURL
resolveURL expands target into an absolute URL using the following rules: - targets starting with '//' are treated as absolute URLs that inherit the p
Chapter07/crawler/link_extractor.go:114
↓ 3 callers
Function
runSearch
(es *elasticsearch.Client, searchQuery map[string]interface{})
Chapter06/textindexer/store/es/es.go:262
↓ 3 callers
Method
sendToWorker
sendToWorker attempts to send a message to a remote worker. It blocks until either the message is enqueued for sending or the job context expires.
Chapter12/dbspgraph/master_job_coordinator.go:228
↓ 3 callers
Function
setLinkID
(id uuid.UUID)
Chapter07/crawler/graph_updater_test.go:72
↓ 3 callers
Function
uuidFromBytes
(b []byte)
Chapter09/linksrus/textindexerapi/server.go:106
↓ 2 callers
Method
AddEdge
AddEdge creates a directed edge from srcID to dstID with the specified cost. An error will be returned if a negative cost value is specified.
Chapter08/shortestpath/path.go:56
↓ 2 callers
Method
AddEdge
AddEdge inserts a directed edge from src to dst. If both src and dst refer to the same vertex then this is a no-op.
Chapter08/pagerank/calculator.go:60
↓ 2 callers
Method
AddPreColoredVertex
AddPreColoredVertex inserts a new vertex with a pre-assigned color.
Chapter08/color/color.go:56
↓ 2 callers
Method
AddUser
AddUser appends user to the room user list.
Chapter04/chat/chat.go:28
↓ 2 callers
Method
AddVertex
AddVertex inserts a new vertex with the specified ID into the graph.
Chapter08/shortestpath/path.go:50
↓ 2 callers
Method
AddVertex
AddVertex inserts a new vertex to the graph with the given id.
Chapter08/pagerank/calculator.go:54
↓ 2 callers
Method
Aggregators
Aggregators returns a map of all currently registered aggregators where the key is the aggregator's name.
Chapter08/bspgraph/graph.go:179
↓ 2 callers
Method
AssignColors
AssignColors executes the Jones/Plassmann algorithm on the graph and invokes the user-defined visitor function for each vertex in the graph.
Chapter08/color/color.go:70
← previous
next →
101–200 of 1,360, ranked by callers