MCPcopy Create free account
hub / github.com/cloud-native-go/examples / _KeyValue_Get_Handler

Function _KeyValue_Get_Handler

ch08/grpc/keyvalue/keyvalue_grpc.pb.go:106–122  ·  view source on GitHub ↗
(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor)

Source from the content-addressed store, hash-verified

104}
105
106func _KeyValue_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
107 in := new(GetRequest)
108 if err := dec(in); err != nil {
109 return nil, err
110 }
111 if interceptor == nil {
112 return srv.(KeyValueServer).Get(ctx, in)
113 }
114 info := &grpc.UnaryServerInfo{
115 Server: srv,
116 FullMethod: "/KeyValue/Get",
117 }
118 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
119 return srv.(KeyValueServer).Get(ctx, req.(*GetRequest))
120 }
121 return interceptor(ctx, in, info, handler)
122}
123
124func _KeyValue_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
125 in := new(PutRequest)

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected