Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/goinaction/code
/ functions
Functions
192 in github.com/goinaction/code
⨍
Functions
192
◇
Types & classes
81
↓ 20 callers
Method
Add
Add attaches tasks to the Runner. A task is a function that takes an int ID.
chapter7/patterns/runner/runner.go:47
↓ 12 callers
Method
Close
Close will shutdown the pool and close all existing resources.
chapter7/patterns/pool/pool.go:83
↓ 6 callers
Method
notify
()
chapter5/listing36/listing36.go:11
↓ 4 callers
Method
Pull
(d *Data)
chapter10/listing04/listing04.go:27
↓ 4 callers
Method
Store
(d Data)
chapter10/listing04/listing04.go:32
↓ 4 callers
Method
notify
notify implements a method with a value receiver.
chapter5/listing11/listing11.go:16
↓ 3 callers
Method
Lock
()
chapter10/listing05/listing05.go:16
↓ 3 callers
Method
Unlock
()
chapter10/listing05/listing05.go:17
↓ 3 callers
Function
createTask
createTask returns an example task that sleeps for the specified number of seconds based on the id.
chapter7/patterns/runner/main/main.go:44
↓ 2 callers
Method
Acquire
Acquire attempts to secure the specified number of buffers from the semaphore channel.
chapter7/patterns/semaphore/semaphore.go:253
↓ 2 callers
Method
Open
Open provides a connection to the database.
chapter3/dbdriver/postgres/postgres.go:14
↓ 2 callers
Method
Release
Release returns the specified number of buffers back into the semaphore channel.
chapter7/patterns/semaphore/semaphore.go:263
↓ 2 callers
Method
Run
Run submits work to the pool.
chapter7/patterns/work/work.go:40
↓ 2 callers
Method
changeEmail
changeEmail implements a method with a pointer receiver.
chapter5/listing11/listing11.go:23
↓ 2 callers
Function
doWork
doWork simulates a goroutine performing work and checking the Shutdown flag to terminate early.
chapter6/listing15/listing15.go:43
↓ 2 callers
Function
incCounter
incCounter increments the package level counter variable.
chapter6/listing13/listing13.go:37
↓ 2 callers
Function
incCounter
incCounter increments the package level counter variable.
chapter6/listing09/listing09.go:34
↓ 2 callers
Function
incCounter
incCounter increments the package level Counter variable using the Mutex to synchronize and provide safe access.
chapter6/listing16/listing16.go:39
↓ 2 callers
Function
player
player simulates a person playing the game of tennis.
chapter6/listing20/listing20.go:39
↓ 2 callers
Function
printPrime
printPrime displays prime numbers for the first 5000 numbers.
chapter6/listing04/listing04.go:35
↓ 2 callers
Function
sendNotification
sendNotification accepts values that implement the notifier interface and sends notifications.
chapter5/listing48/listing48.go:53
↓ 2 callers
Function
start
start uses the generator pattern to create the readerWriter value. It launches goroutines to process the work, returning the created ReaderWriter valu
chapter7/patterns/semaphore/semaphore.go:87
↓ 1 callers
Method
Acquire
Acquire retrieves a resource from the pool.
chapter7/patterns/pool/pool.go:41
↓ 1 callers
Method
Close
Close implements the io.Closer interface so dbConnection can be managed by the pool. Close performs any resource release management.
chapter7/patterns/pool/main/main.go:29
↓ 1 callers
Function
Copy
Copy knows how to pull and store data from any System.
chapter10/listing03/listing03.go:104
↓ 1 callers
Function
Copy
Copy knows how to pull and store data from the System.
chapter10/listing02/listing02.go:98
↓ 1 callers
Function
Copy
Copy knows how to pull and store data from the System.
chapter10/listing01/listing01.go:86
↓ 1 callers
Function
Copy
Copy knows how to pull and store data from any System.
chapter10/listing04/listing04.go:104
↓ 1 callers
Function
Display
Display writes results to the console window as they are received by the individual goroutines.
chapter2/sample/search/match.go:37
↓ 1 callers
Function
Match
Match is launched as a goroutine for each individual feed to run searches concurrently.
chapter2/sample/search/match.go:21
↓ 1 callers
Method
Publish
(key string, v interface{})
chapter10/listing06/listing06.go:12
↓ 1 callers
Method
ReadLock
ReadLock guarantees only the maximum number of goroutines can read at a time.
chapter7/patterns/semaphore/semaphore.go:219
↓ 1 callers
Method
ReadUnlock
ReadUnlock gives other goroutines waiting to read their opporunity.
chapter7/patterns/semaphore/semaphore.go:228
↓ 1 callers
Function
Register
Register is called to register a matcher for use by the program.
chapter2/sample/search/search.go:60
↓ 1 callers
Method
Release
Release places a new resource onto the pool.
chapter7/patterns/pool/pool.go:59
↓ 1 callers
Function
RetrieveFeeds
RetrieveFeeds reads and unmarshals the feed data file.
chapter2/sample/search/feed.go:18
↓ 1 callers
Function
Runner
Runner simulates a person running in the relay race.
chapter6/listing22/listing22.go:33
↓ 1 callers
Method
Search
(searchTerm string, searchResults chan<- []Result)
chapter7/patterns/search/search.go:18
↓ 1 callers
Method
Search
(feed *Feed, searchTerm string)
chapter2/sample/search/match.go:16
↓ 1 callers
Method
Shutdown
Shutdown waits for all the goroutines to shutdown.
chapter7/patterns/work/work.go:45
↓ 1 callers
Method
Start
Start runs all tasks and monitors channel events.
chapter7/patterns/runner/runner.go:52
↓ 1 callers
Method
Subscribe
(key string)
chapter10/listing06/listing06.go:13
↓ 1 callers
Method
Task
()
chapter7/patterns/work/work.go:10
↓ 1 callers
Method
WriteLock
WriteLock blocks all reading so the write can happen safely.
chapter7/patterns/semaphore/semaphore.go:234
↓ 1 callers
Method
WriteUnlock
WriteUnlock releases the write lock and allows reads to occur.
chapter7/patterns/semaphore/semaphore.go:243
↓ 1 callers
Method
gotInterrupt
gotInterrupt verifies if the interrupt signal has been issued.
chapter7/patterns/runner/runner.go:88
↓ 1 callers
Function
mockServer
mockServer returns a pointer to a server to handle the get call.
chapter9/listing12/listing12_test.go:33
↓ 1 callers
Method
notify
notify implements the notifier interface with a pointer receiver.
chapter5/listing48/listing48.go:34
↓ 1 callers
Method
notify
notify implements a method that can be called via a value of type Admin.
chapter5/listing60/listing60.go:37
↓ 1 callers
Function
performQueries
performQueries tests the resource pool of connections.
chapter7/patterns/pool/main/main.go:77
↓ 1 callers
Method
performRead
performRead performs the actual reading work.
chapter7/patterns/semaphore/semaphore.go:163
↓ 1 callers
Method
performWrite
performWrite performs the actual write work.
chapter7/patterns/semaphore/semaphore.go:200
↓ 1 callers
Method
pretty
format pretty-prints the duration value.
chapter5/listing46/listing46.go:11
↓ 1 callers
Function
printer
(ch chan int)
chapter1/channels/hellochannels.go:10
↓ 1 callers
Function
pull
============================================================================= pull knows how to pull bulks of data from any Puller.
chapter10/listing03/listing03.go:82
↓ 1 callers
Function
pull
============================================================================= pull knows how to pull bulks of data from any Puller.
chapter10/listing02/listing02.go:76
↓ 1 callers
Function
pull
============================================================================= pull knows how to pull bulks of data from Xenia.
chapter10/listing01/listing01.go:64
↓ 1 callers
Function
pull
============================================================================= pull knows how to pull bulks of data from any Puller.
chapter10/listing04/listing04.go:82
↓ 1 callers
Method
reader
reader is a goroutine that listens on the shutdown channel and performs reads until the channel is signaled.
chapter7/patterns/semaphore/semaphore.go:146
↓ 1 callers
Method
retrieve
retrieve performs a HTTP Get request for the rss feed and decodes the results.
chapter2/sample/matchers/rss.go:115
↓ 1 callers
Method
run
run executes each registered task.
chapter7/patterns/runner/runner.go:73
↓ 1 callers
Function
sendNotification
sendNotification accepts values that implement the notifier interface and sends notifications.
chapter5/listing56/listing56.go:53
↓ 1 callers
Function
sendNotification
sendNotification accepts values that implement the notifier interface and sends notifications.
chapter5/listing60/listing60.go:68
↓ 1 callers
Function
sendNotification
sendNotification accepts values that implement the notifier interface and sends notifications.
chapter5/listing36/listing36.go:42
↓ 1 callers
Function
shutdown
shutdown stops all of the existing readerWriter processes concurrently.
chapter7/patterns/semaphore/semaphore.go:111
↓ 1 callers
Method
stop
stop signals to all goroutines to shutdown and reports back when that is complete
chapter7/patterns/semaphore/semaphore.go:127
↓ 1 callers
Function
store
store knows how to store bulks of data from any Storer.
chapter10/listing03/listing03.go:93
↓ 1 callers
Function
store
store knows how to store bulks of data from any Storer.
chapter10/listing02/listing02.go:87
↓ 1 callers
Function
store
store knows how to store bulks of data into Pillar.
chapter10/listing01/listing01.go:75
↓ 1 callers
Function
store
store knows how to store bulks of data from any Storer.
chapter10/listing04/listing04.go:93
↓ 1 callers
Function
worker
worker is launched as a goroutine to process work from the buffered channel.
chapter6/listing24/listing24.go:54
↓ 1 callers
Method
writer
writer is a goroutine that listens on the shutdown channel and performs writes until the channel is signaled.
chapter7/patterns/semaphore/semaphore.go:184
Function
BenchmarkFormat
BenchmarkFormat provides performance numbers for the strconv.FormatInt function.
chapter9/listing28/listing28_test.go:26
Function
BenchmarkItoa
BenchmarkItoa provides performance numbers for the strconv.Itoa function.
chapter9/listing28/listing28_test.go:38
Function
BenchmarkSprintf
BenchmarkSprintf provides performance numbers for the fmt.Sprintf function.
chapter9/listing28/listing28_test.go:14
Function
Bing
Bing search will be added to this search session if this option is provided.
chapter7/patterns/search/search.go:39
Function
CountWords
CountWords counts the number of words in the specified string and returns the count.
chapter3/words/count.go:8
Function
ExampleSendJSON
ExampleSendJSON provides a basic example.
chapter9/listing17/handlers/handlers_example_test.go:13
Function
Google
Google search will be added to the search session if this option is provided.
chapter7/patterns/search/search.go:32
Method
Lock
Lock prevents a bike from moving.
chapter10/listing05/listing05.go:37
Method
Move
()
chapter10/listing05/listing05.go:11
Method
Move
Move can change the position of a bike.
chapter10/listing05/listing05.go:32
Function
New
New returns a new ready-to-use Runner.
chapter7/patterns/runner/runner.go:37
Function
New
New creates a new work pool.
chapter7/patterns/work/work.go:21
Function
New
New creates a pool that manages resources. A pool requires a function that can allocate a new resource and the size of the pool.
chapter7/patterns/pool/pool.go:29
Function
New
New creates and returns values of the unexported type alertCounter.
chapter5/listing68/counters/counters.go:10
Function
New
New creates a pubsub value for use.
chapter10/listing06/pubsub/pubsub.go:13
Function
OnlyFirst
OnlyFirst is an option that will restrict the search session to just the first result.
chapter7/patterns/search/search.go:53
Method
Publish
Publish implements the publisher interface for the mock.
chapter10/listing06/listing06.go:21
Method
Publish
Publish sends the data for the specified key.
chapter10/listing06/pubsub/pubsub.go:24
Method
Pull
(d *Data)
chapter10/listing03/listing03.go:27
Method
Pull
Pull knows how to pull data out of Xenia.
chapter10/listing03/listing03.go:47
Method
Pull
(d *Data)
chapter10/listing02/listing02.go:27
Method
Pull
Pull knows how to pull data out of Xenia.
chapter10/listing02/listing02.go:41
Method
Pull
Pull knows how to pull data out of Xenia.
chapter10/listing01/listing01.go:29
Method
Pull
Pull knows how to pull data out of Xenia.
chapter10/listing04/listing04.go:47
Function
Routes
Routes sets the routes for the web service.
chapter9/listing17/handlers/handlers.go:10
Function
Run
Run performs the search logic.
chapter2/sample/search/search.go:12
Method
Search
Search implements the Searcher interface. It performs a search against Google.
chapter7/patterns/search/searchers.go:21
Method
Search
Search implements the Searcher interface. It performs a search against Bing.
chapter7/patterns/search/searchers.go:47
next →
1–100 of 192, ranked by callers