MCPcopy Create free account

hub / github.com/PacktPublishing/gRPC-Go-for-Professionals / functions

Functions178 in github.com/PacktPublishing/gRPC-Go-for-Professionals

↓ 10 callersFunctionnewClient
newClient creates a new client for tests. It uses the bufDialer func (see server/server_test.go) which lets the created client to talk to the server t
chapter9/server/impl_test.go:28
↓ 6 callersMethodaddTask
(description string, dueDate time.Time)
chapter9/server/db.go:7
↓ 6 callersMethoddeleteTask
(id uint64)
chapter9/server/db.go:10
↓ 6 callersFunctionerrorIs
errorIs checks that err has the given code and error message this is only useful for gRPC errors (it uses status.FromError). It returns wether the err
chapter9/server/impl_test.go:43
↓ 6 callersMethodgetTasks
(f func(interface{}) error)
chapter9/server/db.go:8
↓ 6 callersMethodupdateTask
(id uint64, description string, dueDate time.Time, done bool)
chapter9/server/db.go:9
↓ 5 callersMethodAddTask
AddTask adds a Task to the database. It returns the id of the newly inserted Task or an error. If description is empty or if dueDate is in the past, i
chapter9/server/impl.go:40
↓ 5 callersFunctionNewFakeDb
(opt ...TestOption)
chapter9/server/fake_db.go:13
↓ 5 callersMethodReset
()
chapter9/server/fake_db.go:25
↓ 5 callersMethodString
()
chapter2/account.pb.go:94
↓ 4 callersFunctionIsAvailable
(a bool)
chapter9/server/test_options.go:29
↓ 4 callersMethodProtoReflect
()
chapter2/account.pb.go:100
↓ 3 callersMethodDeleteTasks
DeleteTasks deletes Tasks in the database. It reads the changes to be made through stream. For each change being applied it sends back an acknowledgem
chapter9/server/impl.go:133
↓ 3 callersMethodListTasks
ListTasks streams the Tasks present in the database. It optionally returns an error if anything went wrong. It is cancellable and deadline aware.
chapter9/server/impl.go:68
↓ 3 callersMethodUpdateTasks
UpdateTasks apply the updates needed to be made. It reads the changes to be made through stream. It optionally returns an error if anything went wrong
chapter9/server/impl.go:102
↓ 3 callersFunctionaddTask
addTask calls the AddTask unary endpoint with a AddTaskRequest generated from description and dueDate.
chapter7/client/main.go:25
↓ 3 callersFunctionaddTask
addTask calls the AddTask unary endpoint with a AddTaskRequest generated from description and dueDate.
chapter5/client/main.go:20
↓ 3 callersFunctionaddTask
addTask calls the AddTask unary endpoint with a AddTaskRequest generated from description and dueDate.
chapter8/client/main.go:27
↓ 3 callersFunctionaddTask
addTask calls the AddTask unary endpoint with a AddTaskRequest generated from description and dueDate.
chapter6/client/main.go:21
↓ 3 callersFunctionaddTask
addTask calls the AddTask unary endpoint with a AddTaskRequest generated from description and dueDate.
chapter9/client/main.go:28
↓ 3 callersFunctionprintTasks
printTasks calls the ListTasks server streaming endpoint and displays the Tasks on stdout.
chapter7/client/main.go:51
↓ 3 callersFunctionprintTasks
printTasks calls the ListTasks server streaming endpoint and displays the Tasks on stdout.
chapter5/client/main.go:36
↓ 3 callersFunctionprintTasks
printTasks calls the ListTasks server streaming endpoint and displays the Tasks on stdout.
chapter8/client/main.go:53
↓ 3 callersFunctionprintTasks
printTasks calls the ListTasks server streaming endpoint and displays the Tasks on stdout.
chapter6/client/main.go:37
↓ 3 callersFunctionprintTasks
printTasks calls the ListTasks server streaming endpoint and displays the Tasks on stdout.
chapter9/client/main.go:54
↓ 2 callersFunctionfile_account_proto_rawDescGZIP
()
chapter2/account.pb.go:168
↓ 2 callersFunctionlogCalls
"grpc.method" logCalls logs the endpoints being called in a service.
chapter8/server/interceptors.go:53
↓ 2 callersFunctionlogCalls
"grpc.method" logCalls logs the endpoints being called in a service.
chapter9/server/interceptors.go:53
↓ 2 callersFunctionmean
mean calculate the arithmetic mean of multiple time.Duration. It returns the mean in milliseconds.
chapter3/main.go:61
↓ 2 callersFunctionreadResponsesOverStream
(stream pb.TodoService_DeleteTasksClient, waitc chan countAndError)
chapter9/server/impl_test.go:356
↓ 2 callersFunctionsendRequestsOverStream
(stream pb.TodoService_DeleteTasksClient, requests []*pb.DeleteTasksRequest, waitc chan countAndError)
chapter9/server/impl_test.go:341
↓ 2 callersFunctionserializedSize
serializedSize calculates the serialized size of the msg. It returns the number of bytes in which the msg was serialized.
helpers/tags.go:15
↓ 2 callersFunctionserializedSize
serializedSize calculates the serialized size of the msg. It returns the number of bytes in which the msg was serialized.
helpers/split.go:15
↓ 2 callersFunctionvalidateAuthToken
validateAuthToken asserts that the authTokenKey is present and associated with authTokenValue in the current context header.
chapter7/server/interceptors.go:20
↓ 1 callersMethodAddTask
AddTask adds a Task to the database. It returns the id of the newly inserted Task or an error. If description is empty or if dueDate is in the past, i
chapter7/server/impl.go:41
↓ 1 callersMethodAddTask
AddTask adds a Task to the database. It returns the id of the newly inserted Task or an error.
chapter5/server/impl.go:13
↓ 1 callersMethodAddTask
AddTask adds a Task to the database. It returns the id of the newly inserted Task or an error. If description is empty or if dueDate is in the past, i
chapter8/server/impl.go:41
↓ 1 callersMethodAddTask
AddTask adds a Task to the database. It returns the id of the newly inserted Task or an error.
chapter6/server/impl.go:36
↓ 1 callersMethodDeleteTasks
DeleteTasks deletes Tasks in the database. It reads the changes to be made through stream. For each change being applied it sends back an acknowledgem
chapter7/server/impl.go:131
↓ 1 callersMethodDeleteTasks
DeleteTasks deletes Tasks in the database. It reads the changes to be made through stream. For each change being applied it sends back an acknowledgem
chapter5/server/impl.go:62
↓ 1 callersMethodDeleteTasks
DeleteTasks deletes Tasks in the database. It reads the changes to be made through stream. For each change being applied it sends back an acknowledgem
chapter8/server/impl.go:128
↓ 1 callersMethodDeleteTasks
DeleteTasks deletes Tasks in the database. It reads the changes to be made through stream. For each change being applied it sends back an acknowledgem
chapter6/server/impl.go:88
↓ 1 callersMethodDescriptor
()
chapter2/account.pb.go:58
↓ 1 callersMethodDescriptor
Deprecated: Use Account.ProtoReflect.Descriptor instead.
chapter2/account.pb.go:113
↓ 1 callersFunctionFilter
Filter applies a mask (FieldMask) to a msg.
chapter7/server/impl.go:20
↓ 1 callersFunctionFilter
Filter applies a mask (FieldMask) to a msg.
chapter8/server/impl.go:20
↓ 1 callersFunctionFilter
Filter applies a mask (FieldMask) to a msg.
chapter6/server/impl.go:17
↓ 1 callersFunctionFilter
Filter applies a mask (FieldMask) to a msg.
chapter9/server/impl.go:19
↓ 1 callersMethodListTasks
ListTasks streams the Tasks present in the database. It optionally returns an error if anything went wrong. It is cancellable and deadline aware.
chapter7/server/impl.go:72
↓ 1 callersMethodListTasks
ListTasks streams the Tasks present in the database. It optionally returns an error if anything went wrong.
chapter5/server/impl.go:21
↓ 1 callersMethodListTasks
ListTasks streams the Tasks present in the database. It optionally returns an error if anything went wrong. It is cancellable and deadline aware.
chapter8/server/impl.go:69
↓ 1 callersMethodListTasks
ListTasks streams the Tasks present in the database. It optionally returns an error if anything went wrong.
chapter6/server/impl.go:44
↓ 1 callersFunctionNew
New creates a new instance of inMemoryDb
chapter7/server/in_memory.go:19
↓ 1 callersFunctionNew
New creates a new instance of inMemoryDb
chapter5/server/in_memory.go:19
↓ 1 callersFunctionNew
New creates a new instance of inMemoryDb
chapter8/server/in_memory.go:19
↓ 1 callersFunctionNew
New creates a new instance of inMemoryDb
chapter6/server/in_memory.go:19
↓ 1 callersFunctionNew
New creates a new instance of inMemoryDb
chapter9/server/in_memory.go:19
↓ 1 callersMethodUpdateTasks
UpdateTasks apply the updates needed to be made. It reads the changes to be made through stream. It optionally returns an error if anything went wrong
chapter7/server/impl.go:106
↓ 1 callersMethodUpdateTasks
UpdateTasks apply the updates needed to be made. It reads the changes to be made through stream. It optionally returns an error if anything went wrong
chapter5/server/impl.go:37
↓ 1 callersMethodUpdateTasks
UpdateTasks apply the updates needed to be made. It reads the changes to be made through stream. It optionally returns an error if anything went wrong
chapter8/server/impl.go:103
↓ 1 callersMethodUpdateTasks
UpdateTasks apply the updates needed to be made. It reads the changes to be made through stream. It optionally returns an error if anything went wrong
chapter6/server/impl.go:63
↓ 1 callersMethodapply
(*testOptions)
chapter9/server/test_options.go:12
↓ 1 callersFunctioncompressedSize
compressedSize calculates the number of bytes after compression with gzip. It returns two values. The number of bytes the msg takes after serializatio
helpers/gzip.go:20
↓ 1 callersFunctiondeleteTasks
deleteTasks calls the DeleteTasks bidi streaming endpoint with the provided reqs.
chapter7/client/main.go:113
↓ 1 callersFunctiondeleteTasks
deleteTasks calls the DeleteTasks bidi streaming endpoint with the provided reqs.
chapter5/client/main.go:85
↓ 1 callersFunctiondeleteTasks
deleteTasks calls the DeleteTasks bidi streaming endpoint with the provided reqs.
chapter8/client/main.go:115
↓ 1 callersFunctiondeleteTasks
deleteTasks calls the DeleteTasks bidi streaming endpoint with the provided reqs.
chapter6/client/main.go:88
↓ 1 callersFunctiondeleteTasks
deleteTasks calls the DeleteTasks bidi streaming endpoint with the provided reqs.
chapter9/client/main.go:117
↓ 1 callersFunctionfile_account_proto_init
()
chapter2/account.pb.go:191
↓ 1 callersFunctionnewFuncTestOption
(f func(*testOptions))
chapter9/server/test_options.go:23
↓ 1 callersFunctionnewGrpcServer
(lis net.Listener, srvMetrics *grpcprom.ServerMetrics)
chapter8/server/main.go:41
↓ 1 callersFunctionnewGrpcServer
(lis net.Listener, srvMetrics *grpcprom.ServerMetrics)
chapter9/server/main.go:40
↓ 1 callersFunctionnewMetricsServer
(httpAddr string, reg *prometheus.Registry)
chapter8/server/main.go:33
↓ 1 callersFunctionnewMetricsServer
(httpAddr string, reg *prometheus.Registry)
chapter9/server/main.go:32
↓ 1 callersFunctionreadFromJSON
readFromJSON reads JSON data from accounts.json. It returns the time (time.Duration) it took deserialize the data.
chapter3/main.go:24
↓ 1 callersFunctionreadFromPB
readFromPB reads Protobuf data from accounts.bin. It returns the time (time.Duration) it took deserialize the data.
chapter3/main.go:41
↓ 1 callersFunctionserializedSize
serializedSize calculates the size in memory of data and the size after Protobuf serialization of the wrapper. It returns two values. The number of by
helpers/integers.go:18
↓ 1 callersFunctionupdateTasks
updateTasks calls the UpdateTasks client streaming endpoint with the provided reqs.
chapter7/client/main.go:88
↓ 1 callersFunctionupdateTasks
updateTasks calls the UpdateTasks client streaming endpoint with the provided reqs.
chapter5/client/main.go:61
↓ 1 callersFunctionupdateTasks
updateTasks calls the UpdateTasks client streaming endpoint with the provided reqs.
chapter8/client/main.go:90
↓ 1 callersFunctionupdateTasks
updateTasks calls the UpdateTasks client streaming endpoint with the provided reqs.
chapter6/client/main.go:64
↓ 1 callersFunctionupdateTasks
updateTasks calls the UpdateTasks client streaming endpoint with the provided reqs.
chapter9/client/main.go:91
MethodEnum
()
chapter2/account.pb.go:48
MethodEnumDescriptor
Deprecated: Use AccountRight.Descriptor instead.
chapter2/account.pb.go:71
MethodGetId
()
chapter2/account.pb.go:117
MethodGetRight
()
chapter2/account.pb.go:131
MethodGetUsername
()
chapter2/account.pb.go:124
MethodLimit
Limit tells wether or not to allow a certain request depending on the underlying limiter decision.
chapter8/server/limit.go:17
MethodLimit
Limit tells wether or not to allow a certain request depending on the underlying limiter decision.
chapter9/server/limit.go:17
MethodNumber
()
chapter2/account.pb.go:66
MethodProtoMessage
()
chapter2/account.pb.go:98
MethodReset
()
chapter2/account.pb.go:85
MethodString
()
chapter2/account.pb.go:54
FunctionTestRunAll
(t *testing.T)
chapter9/server/impl_test.go:55
MethodType
()
chapter2/account.pb.go:62
MethodaddTask
addTask appends a Task, generated from description and dueDate, to the underlying array. It never returns an error but a real database might!
chapter7/server/in_memory.go:25
MethodaddTask
(description string, dueDate time.Time)
chapter7/server/db.go:7
MethodaddTask
addTask appends a Task, generated from description and dueDate, to the underlying array. It never returns an error but a real database might!
chapter5/server/in_memory.go:25
MethodaddTask
(description string, dueDate time.Time)
chapter5/server/db.go:7
MethodaddTask
addTask appends a Task, generated from description and dueDate, to the underlying array. It never returns an error but a real database might!
chapter8/server/in_memory.go:25
next →1–100 of 178, ranked by callers