MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / NewDataStorer

Function NewDataStorer

pkg/controller/function/function_server.go:40–50  ·  view source on GitHub ↗

NewDataStorer create a apiserver client

(o *registry.Options, storageCache *StorageCache)

Source from the content-addressed store, hash-verified

38
39// NewDataStorer create a apiserver client
40func NewDataStorer(o *registry.Options, storageCache *StorageCache) (ds DataStorer, err error) {
41 rpcClient, err := registry.NewRegistry(o)
42 if err != nil {
43 return nil, err
44 }
45 ds = &functionServerClient{
46 rpcClient: rpcClient,
47 cache: storageCache,
48 }
49 return
50}
51
52func (f *functionServerClient) GetFunction(input *api.GetFunctionInput) (output *api.GetFunctionOutput, hitCache bool, err error) {
53 if input.WithCache {

Callers 1

InitFunction · 0.92

Calls 1

NewRegistryFunction · 0.92

Tested by

no test coverage detected