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

Method PutState

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

Source from the content-addressed store, hash-verified

311}
312
313func (f *FunctionServerImpl) PutState(ctx context.Context, req *proto.PutStateRequest) (*proto.Response, error) {
314 runtime, err := f.getFunctionRuntime(ctx)
315 if err != nil {
316 return nil, err
317 }
318 runtime.log.Debug("put state")
319 err = runtime.instance.FunctionContext().PutState(req.Key, req.Value)
320 if err != nil {
321 return nil, err
322 }
323 return &proto.Response{
324 Status: proto.Response_OK,
325 }, nil
326}
327
328func (f *FunctionServerImpl) GetState(ctx context.Context, req *proto.GetStateRequest) (*proto.GetStateResponse,
329 error) {

Callers

nothing calls this directly

Calls 4

getFunctionRuntimeMethod · 0.95
DebugMethod · 0.80
PutStateMethod · 0.65
FunctionContextMethod · 0.65

Tested by

no test coverage detected