Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PacktPublishing/System-Programming-Essentials-with-Go
/ functions
Functions
214 in github.com/PacktPublishing/System-Programming-Essentials-with-Go
⨍
Functions
214
◇
Types & classes
17
↓ 13 callers
Method
Set
Set adds or updates a cache entry with the specified key, value, and TTL
ch13/cache.go:39
↓ 12 callers
Method
Get
Get retrieves a cache entry by its key. It returns the value and a boolean indicating whether the key was found
ch13/cache.go:63
↓ 9 callers
Function
NewCache
NewCache initializes and returns a new Cache with the given capacity
ch13/cache.go:30
↓ 7 callers
Method
Start
Start the scheduler to listen for and execute jobs
ch5/task_scheduling/main.go:24
↓ 6 callers
Function
NewHashRing
NewHashRing creates a new HashRing
ch13/hashring.go:23
↓ 5 callers
Method
AddNode
AddNode adds a node to the hash ring
ch13/hashring.go:28
↓ 4 callers
Method
GetNode
GetNode returns the node responsible for the given key
ch13/hashring.go:62
↓ 3 callers
Method
Get
()
ch14/buffer_pool/main.go:23
↓ 3 callers
Method
Put
(buf *bytes.Buffer)
ch14/buffer_pool/main.go:27
↓ 3 callers
Method
hash
(key string)
ch13/hashring.go:79
↓ 3 callers
Function
organizeFiles
(paths []string)
appendix-a/usb/example1/organizer.go:9
↓ 3 callers
Function
sendAlert
(event string)
ch9/cpu-profiling/main.go:51
↓ 2 callers
Function
NewCliConfig
(opts ...Option)
ch3/cli_with_tests/main.go:23
↓ 2 callers
Function
PackItems
(m *sync.Mutex, totalItems int)
ch2/changing-shared-state/example_5/main.go:13
↓ 2 callers
Function
PackItems
(totalItems int)
ch2/changing-shared-state/example_3/main.go:20
↓ 2 callers
Function
PackItems
(totalItems int32)
ch2/changing-shared-state/example_4/main.go:13
↓ 2 callers
Function
SendTask
(pipe *os.File, data string)
ch6/named_pipes/main.go:49
↓ 2 callers
Function
Sum
Sum returns the sum of two integers
ch9/benchmarking/main.go:12
↓ 2 callers
Function
app
(words []string, cfg CliConfig)
ch3/cli_with_tests/main.go:13
↓ 2 callers
Function
createTempFileWithExt
helper function to create a temporary file with a given extension
appendix-a/usb/example1/organizer_test.go:10
↓ 2 callers
Method
evictExpiredItems
evictExpiredItems removes all expired items from the cache
ch13/cache.go:101
↓ 2 callers
Method
forwardRequest
(targetNode Node, r *http.Request)
ch13/server.go:116
↓ 2 callers
Function
removeTrailingNullChars
(s string)
appendix-a/usb/main.go:116
↓ 2 callers
Function
say
(s string)
ch2/understanding-gourotines/example_2/main.go:12
↓ 2 callers
Function
say
(s string)
ch2/understanding-gourotines/example_3/main.go:12
↓ 2 callers
Function
say
(s string)
ch2/understanding-gourotines/example_1/main.go:12
↓ 2 callers
Function
say
(s string, wg *sync.WaitGroup)
ch2/understanding-gourotines/waitgroup/main.go:18
↓ 2 callers
Function
scanDirectory
(dir string)
ch9/cpu-profiling/main.go:18
↓ 2 callers
Method
send
()
appendix-a/usb/main.go:192
↓ 2 callers
Function
throwBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_5/main.go:14
↓ 2 callers
Function
throwBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_6/main.go:15
↓ 2 callers
Function
throwBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_8/main.go:16
↓ 2 callers
Function
throwBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_7/main.go:16
↓ 2 callers
Function
throwBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_9/main.go:33
↓ 1 callers
Function
Add
(a, b int)
ch1/tooling/test/math.go:3
↓ 1 callers
Function
Fib
Fib returns the nth number in the Fibonacci sequence
ch9/benchmarking/main.go:4
↓ 1 callers
Function
NewBufferPool
()
ch14/buffer_pool/main.go:13
↓ 1 callers
Function
NewDefaultNotification
(deviceName string)
appendix-a/usb/main.go:30
↓ 1 callers
Function
NewScheduler
NewScheduler creates a new Scheduler
ch5/task_scheduling/main.go:17
↓ 1 callers
Function
PackItems
(totalItems int)
ch2/changing-shared-state/example_2/main.go:21
↓ 1 callers
Function
PackItems
(totalItems int)
ch2/changing-shared-state/example_1/main.go:12
↓ 1 callers
Function
ProcessData
(data []byte, bp *BufferPool)
ch14/buffer_pool/main.go:32
↓ 1 callers
Function
ReadTask
(pipe *os.File)
ch6/named_pipes/main.go:57
↓ 1 callers
Method
RemoveNode
RemoveNode removes a node from the hash ring
ch13/hashring.go:40
↓ 1 callers
Method
Schedule
Schedule a job to be executed after a delay
ch5/task_scheduling/main.go:31
↓ 1 callers
Function
TraceHandler
(inner http.HandlerFunc)
ch11/tracing_http/main.go:9
↓ 1 callers
Function
WithErrStream
(errStream io.Writer)
ch3/cli_with_tests/main.go:39
↓ 1 callers
Function
WithOutStream
(outStream io.Writer)
ch3/cli_with_tests/main.go:46
↓ 1 callers
Function
broadcastMessage
(message string)
ch7/03_multiple_clients/main.go:60
↓ 1 callers
Method
bytesToUint32
(b []byte)
ch13/hashring.go:85
↓ 1 callers
Function
calculateDirSize
(path string)
ch4/calculating_dir_size/main.go:9
↓ 1 callers
Function
clen
(n []byte)
ch5/monitoring_with_inotify/main.go:9
↓ 1 callers
Function
clen
(n []byte)
ch5/timer_signals/main.go:10
↓ 1 callers
Function
closeLogFile
()
ch5/log_rotation/main.go:106
↓ 1 callers
Function
compareAndEmitEvents
(oldState, newState map[string]FileInfo)
ch9/cpu-profiling/main.go:38
↓ 1 callers
Function
computeFileHash
(filePath string)
ch4/finding_duplicates/main.go:11
↓ 1 callers
Function
createLogFile
()
ch5/log_rotation/main.go:113
↓ 1 callers
Function
createPerson
go:noinline
ch9/escape-analysis/main.go:16
↓ 1 callers
Method
evictLRU
evictLRU removes the least recently used item from the cache
ch13/cache.go:81
↓ 1 callers
Function
filterLogs
(reader io.Reader, writer io.Writer)
ch6/log_processing/main.go:12
↓ 1 callers
Function
findDuplicateFiles
(rootDir string)
ch4/finding_duplicates/main.go:26
↓ 1 callers
Function
handleConnection
(conn net.Conn)
ch7/02_single_client/main.go:34
↓ 1 callers
Function
handleConnection
(conn net.Conn)
ch7/03_multiple_clients/main.go:44
↓ 1 callers
Function
handleConnection
(conn net.Conn)
ch10/echo-server/main.go:25
↓ 1 callers
Function
handleConnection
(conn net.Conn)
ch14/network_server/main.go:15
↓ 1 callers
Function
isPartition
(s string)
appendix-a/usb/main.go:124
↓ 1 callers
Function
lockScreen
()
appendix-a/bluetooth/main.go:43
↓ 1 callers
Function
marshalData
(data Data)
ch14/json_marshaling/main.go:20
↓ 1 callers
Function
mountPoints
(deviceNames []string)
appendix-a/usb/main.go:133
↓ 1 callers
Function
mountPoints
(deviceNames []string)
appendix-a/usb/example5/main.go:19
↓ 1 callers
Function
namedPipeExists
(pipePath string)
ch6/named_pipes/main.go:76
↓ 1 callers
Function
organizeFiles
(paths []string)
appendix-a/usb/main.go:214
↓ 1 callers
Function
removeClient
(conn net.Conn)
ch7/03_multiple_clients/main.go:68
↓ 1 callers
Method
replicateSet
(key, value string)
ch13/server.go:63
↓ 1 callers
Function
retry
retry is a generic function that performs retries for a given function.
appendix-a/usb/main.go:178
↓ 1 callers
Function
retry
retry is a function that simulates the clowns trying to get in the car chaotically by sleeping for a random amount of time between 2000 and 10000 mill
ch2/making-sense-of-channels/example_10/main.go:71
↓ 1 callers
Function
rotateLogFile
()
ch5/log_rotation/main.go:82
↓ 1 callers
Function
sendAck
(conn *net.UDPConn, addr *net.UDPAddr, seqNum uint32)
ch10/selective-retransmissions/main.go:92
↓ 1 callers
Function
sendPacket
(conn *net.UDPConn, addr *net.UDPAddr, packet *Packet)
ch10/selective-retransmissions/main.go:71
↓ 1 callers
Function
throwBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_4/main.go:11
↓ 1 callers
Function
unpackUint32
(buf []byte)
ch10/selective-retransmissions/main.go:101
Function
BenchmarkFib10
Benchmark for the Fibonacci function
ch9/benchmarking/main_test.go:6
Function
BenchmarkSum
Benchmark for the Sum function
ch9/benchmarking/main_test.go:13
Function
BenchmarkSumSub
Sub-benchmark for the Sum function with different cases
ch9/benchmarking/main_test.go:20
Method
GetHandler
(w http.ResponseWriter, r *http.Request)
ch13/server.go:97
Function
NewCacheServer
(peers []string)
ch13/server.go:27
Method
SetHandler
(w http.ResponseWriter, r *http.Request)
ch13/server.go:40
Function
TestAdd
(t *testing.T)
ch1/tooling/test/math_test.go:5
Function
TestCacheConcurrency
(t *testing.T)
ch13/cache_test.go:84
Function
TestCacheEvictsExpiredItems
(t *testing.T)
ch13/cache_test.go:73
Function
TestCacheEvictsLRU
(t *testing.T)
ch13/cache_test.go:62
Function
TestCacheGetNonExistentKeyBehavior
(t *testing.T)
ch13/cache_test.go:27
Function
TestCacheInitialization
(t *testing.T)
ch13/cache_test.go:10
Function
TestCacheSetAndGetBehavior
(t *testing.T)
ch13/cache_test.go:17
Function
TestCacheSetOverwritesValueBehavior
(t *testing.T)
ch13/cache_test.go:36
Function
TestCacheSetUpdatesExpiryTime
(t *testing.T)
ch13/cache_test.go:47
Function
TestHashRingAddNode
(t *testing.T)
ch13/hashring_test.go:14
Function
TestHashRingGetNode
(t *testing.T)
ch13/hashring_test.go:35
Function
TestHashRingGetNodeWithEmptyRing
(t *testing.T)
ch13/hashring_test.go:48
Function
TestHashRingInitialization
(t *testing.T)
ch13/hashring_test.go:7
next →
1–100 of 214, ranked by callers