NewDataStorer create a apiserver client
(o *registry.Options, storageCache *StorageCache)
| 38 | |
| 39 | // NewDataStorer create a apiserver client |
| 40 | func 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 | |
| 52 | func (f *functionServerClient) GetFunction(input *api.GetFunctionInput) (output *api.GetFunctionOutput, hitCache bool, err error) { |
| 53 | if input.WithCache { |