// Load loads a saved Api instance from its ConfigStore.
Load loads a saved Api instance from its ConfigStore.
// Load loads a saved Api instance from its ConfigStore .
func Load(ds datastore.Datastore, iid ffs.APIID, sched *scheduler.Scheduler, wm ffs.WalletManager, drm ffs.DealRecordsManager) (*API, error) {
	is := newInstanceStore(namespace.Wrap(ds, datastore.NewKey("istore")))
	c, err := is.getInstanceConfig()
	if err != nil {
		return nil, fmt.Errorf("loading instance: %s", err)
	}
	ctx, cancel := context.WithCancel(context.Background())
	return new(ctx, is, wm, drm, c, sched, cancel), nil
}
func Load ( ds datastore . Datastore , iid ffs . APIID , sched * scheduler . Scheduler , wm ffs . WalletManager , drm ffs . DealRecordsManager ) ( * API , error ) { is := newInstanceStore ( namespace . Wrap ( ds , datastore . NewKey ( " " ) ) ) c , err := is . getInstanceConfig ( ) if err != nil { return nil , fmt . Errorf ( " " , err ) } ctx , cancel := context . WithCancel ( context . Background ( ) ) return new ( ctx , is , wm , drm , c , sched , cancel ) , nil }
Load loads a saved Api instance from its ConfigStore.
Load loads a saved Api instance from its ConfigStore .