import * as RPC from 'src/lib/rpc';

export const start = async (kind, instance, characteristics) => {
  const result = await RPC.callMethod(
    'services.start', [kind, instance, characteristics]
  );
  return result;
};

export const stop = async (kind, instance) => {
  const result = await RPC.callMethod('services.stop', [kind, instance]);
  return result;
};

export const use = async (kind, instance, capability, params) => {
  const result = await RPC.callMethod(
    'services.use', [kind, instance, capability, params]
  );
  return result;
};
