MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / GetState

Method GetState

fs/runtime/grpc/grpc_func.go:328–342  ·  view source on GitHub ↗
(ctx context.Context, req *proto.GetStateRequest)

Source from the content-addressed store, hash-verified

326}
327
328func (f *FunctionServerImpl) GetState(ctx context.Context, req *proto.GetStateRequest) (*proto.GetStateResponse,
329 error) {
330 runtime, err := f.getFunctionRuntime(ctx)
331 if err != nil {
332 return nil, err
333 }
334 runtime.log.Debug("get state")
335 v, err := runtime.instance.FunctionContext().GetState(req.Key)
336 if err != nil {
337 return nil, err
338 }
339 return &proto.GetStateResponse{
340 Value: v,
341 }, nil
342}
343
344func StartGRPCServer(f *FSSReconcileServer, addr string) (*grpc.Server, error) {
345 lis, err := net.Listen("tcp", addr)

Callers

nothing calls this directly

Calls 4

getFunctionRuntimeMethod · 0.95
DebugMethod · 0.80
GetStateMethod · 0.65
FunctionContextMethod · 0.65

Tested by

no test coverage detected