Add missed machinery:repair/5 functions (#8)

This commit is contained in:
Andrey Fadeev 2019-02-12 17:21:04 +03:00 committed by GitHub
parent a8650ae0f8
commit 3a6c5b675d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,8 @@
-export([start/4]).
-export([call/4]).
-export([call/5]).
-export([repair/4]).
-export([repair/5]).
-export([get/3]).
-export([get/4]).
@ -129,6 +131,17 @@ call(NS, ID, Range, Args, Backend) ->
{Module, Opts} = machinery_utils:get_backend(Backend),
machinery_backend:call(Module, NS, ID, Range, Args, Opts).
-spec repair(namespace(), id(), args(_), backend(_)) ->
ok | {error, notfound | working}.
repair(NS, ID, Args, Backend) ->
repair(NS, ID, {undefined, undefined, forward}, Args, Backend).
-spec repair(namespace(), id(), range(), args(_), backend(_)) ->
ok | {error, notfound | working}.
repair(NS, ID, Range, Args, Backend) ->
{Module, Opts} = machinery_utils:get_backend(Backend),
machinery_backend:repair(Module, NS, ID, Range, Args, Opts).
-spec get(namespace(), id(), backend(_)) ->
{ok, machine(_, _)} | {error, notfound}.
get(NS, ID, Backend) ->