MCPcopy Create free account

hub / github.com/PacktPublishing/System-Programming-Essentials-with-Go / functions

Functions214 in github.com/PacktPublishing/System-Programming-Essentials-with-Go

↓ 13 callersMethodSet
Set adds or updates a cache entry with the specified key, value, and TTL
ch13/cache.go:39
↓ 12 callersMethodGet
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 callersFunctionNewCache
NewCache initializes and returns a new Cache with the given capacity
ch13/cache.go:30
↓ 7 callersMethodStart
Start the scheduler to listen for and execute jobs
ch5/task_scheduling/main.go:24
↓ 6 callersFunctionNewHashRing
NewHashRing creates a new HashRing
ch13/hashring.go:23
↓ 5 callersMethodAddNode
AddNode adds a node to the hash ring
ch13/hashring.go:28
↓ 4 callersMethodGetNode
GetNode returns the node responsible for the given key
ch13/hashring.go:62
↓ 3 callersMethodGet
()
ch14/buffer_pool/main.go:23
↓ 3 callersMethodPut
(buf *bytes.Buffer)
ch14/buffer_pool/main.go:27
↓ 3 callersMethodhash
(key string)
ch13/hashring.go:79
↓ 3 callersFunctionorganizeFiles
(paths []string)
appendix-a/usb/example1/organizer.go:9
↓ 3 callersFunctionsendAlert
(event string)
ch9/cpu-profiling/main.go:51
↓ 2 callersFunctionNewCliConfig
(opts ...Option)
ch3/cli_with_tests/main.go:23
↓ 2 callersFunctionPackItems
(m *sync.Mutex, totalItems int)
ch2/changing-shared-state/example_5/main.go:13
↓ 2 callersFunctionPackItems
(totalItems int)
ch2/changing-shared-state/example_3/main.go:20
↓ 2 callersFunctionPackItems
(totalItems int32)
ch2/changing-shared-state/example_4/main.go:13
↓ 2 callersFunctionSendTask
(pipe *os.File, data string)
ch6/named_pipes/main.go:49
↓ 2 callersFunctionSum
Sum returns the sum of two integers
ch9/benchmarking/main.go:12
↓ 2 callersFunctionapp
(words []string, cfg CliConfig)
ch3/cli_with_tests/main.go:13
↓ 2 callersFunctioncreateTempFileWithExt
helper function to create a temporary file with a given extension
appendix-a/usb/example1/organizer_test.go:10
↓ 2 callersMethodevictExpiredItems
evictExpiredItems removes all expired items from the cache
ch13/cache.go:101
↓ 2 callersMethodforwardRequest
(targetNode Node, r *http.Request)
ch13/server.go:116
↓ 2 callersFunctionremoveTrailingNullChars
(s string)
appendix-a/usb/main.go:116
↓ 2 callersFunctionsay
(s string)
ch2/understanding-gourotines/example_2/main.go:12
↓ 2 callersFunctionsay
(s string)
ch2/understanding-gourotines/example_3/main.go:12
↓ 2 callersFunctionsay
(s string)
ch2/understanding-gourotines/example_1/main.go:12
↓ 2 callersFunctionsay
(s string, wg *sync.WaitGroup)
ch2/understanding-gourotines/waitgroup/main.go:18
↓ 2 callersFunctionscanDirectory
(dir string)
ch9/cpu-profiling/main.go:18
↓ 2 callersMethodsend
()
appendix-a/usb/main.go:192
↓ 2 callersFunctionthrowBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_5/main.go:14
↓ 2 callersFunctionthrowBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_6/main.go:15
↓ 2 callersFunctionthrowBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_8/main.go:16
↓ 2 callersFunctionthrowBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_7/main.go:16
↓ 2 callersFunctionthrowBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_9/main.go:33
↓ 1 callersFunctionAdd
(a, b int)
ch1/tooling/test/math.go:3
↓ 1 callersFunctionFib
Fib returns the nth number in the Fibonacci sequence
ch9/benchmarking/main.go:4
↓ 1 callersFunctionNewBufferPool
()
ch14/buffer_pool/main.go:13
↓ 1 callersFunctionNewDefaultNotification
(deviceName string)
appendix-a/usb/main.go:30
↓ 1 callersFunctionNewScheduler
NewScheduler creates a new Scheduler
ch5/task_scheduling/main.go:17
↓ 1 callersFunctionPackItems
(totalItems int)
ch2/changing-shared-state/example_2/main.go:21
↓ 1 callersFunctionPackItems
(totalItems int)
ch2/changing-shared-state/example_1/main.go:12
↓ 1 callersFunctionProcessData
(data []byte, bp *BufferPool)
ch14/buffer_pool/main.go:32
↓ 1 callersFunctionReadTask
(pipe *os.File)
ch6/named_pipes/main.go:57
↓ 1 callersMethodRemoveNode
RemoveNode removes a node from the hash ring
ch13/hashring.go:40
↓ 1 callersMethodSchedule
Schedule a job to be executed after a delay
ch5/task_scheduling/main.go:31
↓ 1 callersFunctionTraceHandler
(inner http.HandlerFunc)
ch11/tracing_http/main.go:9
↓ 1 callersFunctionWithErrStream
(errStream io.Writer)
ch3/cli_with_tests/main.go:39
↓ 1 callersFunctionWithOutStream
(outStream io.Writer)
ch3/cli_with_tests/main.go:46
↓ 1 callersFunctionbroadcastMessage
(message string)
ch7/03_multiple_clients/main.go:60
↓ 1 callersMethodbytesToUint32
(b []byte)
ch13/hashring.go:85
↓ 1 callersFunctioncalculateDirSize
(path string)
ch4/calculating_dir_size/main.go:9
↓ 1 callersFunctionclen
(n []byte)
ch5/monitoring_with_inotify/main.go:9
↓ 1 callersFunctionclen
(n []byte)
ch5/timer_signals/main.go:10
↓ 1 callersFunctioncloseLogFile
()
ch5/log_rotation/main.go:106
↓ 1 callersFunctioncompareAndEmitEvents
(oldState, newState map[string]FileInfo)
ch9/cpu-profiling/main.go:38
↓ 1 callersFunctioncomputeFileHash
(filePath string)
ch4/finding_duplicates/main.go:11
↓ 1 callersFunctioncreateLogFile
()
ch5/log_rotation/main.go:113
↓ 1 callersFunctioncreatePerson
go:noinline
ch9/escape-analysis/main.go:16
↓ 1 callersMethodevictLRU
evictLRU removes the least recently used item from the cache
ch13/cache.go:81
↓ 1 callersFunctionfilterLogs
(reader io.Reader, writer io.Writer)
ch6/log_processing/main.go:12
↓ 1 callersFunctionfindDuplicateFiles
(rootDir string)
ch4/finding_duplicates/main.go:26
↓ 1 callersFunctionhandleConnection
(conn net.Conn)
ch7/02_single_client/main.go:34
↓ 1 callersFunctionhandleConnection
(conn net.Conn)
ch7/03_multiple_clients/main.go:44
↓ 1 callersFunctionhandleConnection
(conn net.Conn)
ch10/echo-server/main.go:25
↓ 1 callersFunctionhandleConnection
(conn net.Conn)
ch14/network_server/main.go:15
↓ 1 callersFunctionisPartition
(s string)
appendix-a/usb/main.go:124
↓ 1 callersFunctionlockScreen
()
appendix-a/bluetooth/main.go:43
↓ 1 callersFunctionmarshalData
(data Data)
ch14/json_marshaling/main.go:20
↓ 1 callersFunctionmountPoints
(deviceNames []string)
appendix-a/usb/main.go:133
↓ 1 callersFunctionmountPoints
(deviceNames []string)
appendix-a/usb/example5/main.go:19
↓ 1 callersFunctionnamedPipeExists
(pipePath string)
ch6/named_pipes/main.go:76
↓ 1 callersFunctionorganizeFiles
(paths []string)
appendix-a/usb/main.go:214
↓ 1 callersFunctionremoveClient
(conn net.Conn)
ch7/03_multiple_clients/main.go:68
↓ 1 callersMethodreplicateSet
(key, value string)
ch13/server.go:63
↓ 1 callersFunctionretry
retry is a generic function that performs retries for a given function.
appendix-a/usb/main.go:178
↓ 1 callersFunctionretry
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 callersFunctionrotateLogFile
()
ch5/log_rotation/main.go:82
↓ 1 callersFunctionsendAck
(conn *net.UDPConn, addr *net.UDPAddr, seqNum uint32)
ch10/selective-retransmissions/main.go:92
↓ 1 callersFunctionsendPacket
(conn *net.UDPConn, addr *net.UDPAddr, packet *Packet)
ch10/selective-retransmissions/main.go:71
↓ 1 callersFunctionthrowBalls
(color string, balls chan string)
ch2/making-sense-of-channels/example_4/main.go:11
↓ 1 callersFunctionunpackUint32
(buf []byte)
ch10/selective-retransmissions/main.go:101
FunctionBenchmarkFib10
Benchmark for the Fibonacci function
ch9/benchmarking/main_test.go:6
FunctionBenchmarkSum
Benchmark for the Sum function
ch9/benchmarking/main_test.go:13
FunctionBenchmarkSumSub
Sub-benchmark for the Sum function with different cases
ch9/benchmarking/main_test.go:20
MethodGetHandler
(w http.ResponseWriter, r *http.Request)
ch13/server.go:97
FunctionNewCacheServer
(peers []string)
ch13/server.go:27
MethodSetHandler
(w http.ResponseWriter, r *http.Request)
ch13/server.go:40
FunctionTestAdd
(t *testing.T)
ch1/tooling/test/math_test.go:5
FunctionTestCacheConcurrency
(t *testing.T)
ch13/cache_test.go:84
FunctionTestCacheEvictsExpiredItems
(t *testing.T)
ch13/cache_test.go:73
FunctionTestCacheEvictsLRU
(t *testing.T)
ch13/cache_test.go:62
FunctionTestCacheGetNonExistentKeyBehavior
(t *testing.T)
ch13/cache_test.go:27
FunctionTestCacheInitialization
(t *testing.T)
ch13/cache_test.go:10
FunctionTestCacheSetAndGetBehavior
(t *testing.T)
ch13/cache_test.go:17
FunctionTestCacheSetOverwritesValueBehavior
(t *testing.T)
ch13/cache_test.go:36
FunctionTestCacheSetUpdatesExpiryTime
(t *testing.T)
ch13/cache_test.go:47
FunctionTestHashRingAddNode
(t *testing.T)
ch13/hashring_test.go:14
FunctionTestHashRingGetNode
(t *testing.T)
ch13/hashring_test.go:35
FunctionTestHashRingGetNodeWithEmptyRing
(t *testing.T)
ch13/hashring_test.go:48
FunctionTestHashRingInitialization
(t *testing.T)
ch13/hashring_test.go:7
next →1–100 of 214, ranked by callers