StorageProviderPlugin: {
    methods: {
        addObserver: {
            I: typeof StoragePeer;
            O: typeof AddObserverResponse;
            kind: Unary;
            name: "AddObserver";
        };
        addVoter: {
            I: typeof StoragePeer;
            O: typeof AddVoterResponse;
            kind: Unary;
            name: "AddVoter";
        };
        bootstrap: {
            I: typeof BootstrapRequest;
            O: typeof BootstrapResponse;
            kind: Unary;
            name: "Bootstrap";
        };
        deleteValue: {
            I: typeof DeleteValueRequest;
            O: typeof DeleteValueResponse;
            kind: Unary;
            name: "DeleteValue";
        };
        demoteVoter: {
            I: typeof StoragePeer;
            O: typeof DemoteVoterResponse;
            kind: Unary;
            name: "DemoteVoter";
        };
        getLeader: {
            I: typeof GetLeaderRequest;
            O: typeof StoragePeer;
            kind: Unary;
            name: "GetLeader";
        };
        getPeers: {
            I: typeof GetPeersRequest;
            O: typeof StoragePeers;
            kind: Unary;
            name: "GetPeers";
        };
        getStatus: {
            I: typeof StorageStatusRequest;
            O: typeof StorageStatus;
            kind: Unary;
            name: "GetStatus";
        };
        getValue: {
            I: typeof GetValueRequest;
            O: typeof GetValueResponse;
            kind: Unary;
            name: "GetValue";
        };
        listKeys: {
            I: typeof ListKeysRequest;
            O: typeof ListKeysResponse;
            kind: Unary;
            name: "ListKeys";
        };
        listValues: {
            I: typeof ListValuesRequest;
            O: typeof ListValuesResponse;
            kind: Unary;
            name: "ListValues";
        };
        putValue: {
            I: typeof PutValueRequest;
            O: typeof PutValueResponse;
            kind: Unary;
            name: "PutValue";
        };
        removePeer: {
            I: typeof StoragePeer;
            O: typeof RemoveServerResponse;
            kind: Unary;
            name: "RemovePeer";
        };
        subscribePrefix: {
            I: typeof SubscribePrefixRequest;
            O: typeof PrefixEvent;
            kind: ServerStreaming;
            name: "SubscribePrefix";
        };
    };
    typeName: "v1.StorageProviderPlugin";
} = ...

StorageProviderPlugin is the service definition for a Webmesh storage provider.

Type declaration

  • Readonly methods: {
        addObserver: {
            I: typeof StoragePeer;
            O: typeof AddObserverResponse;
            kind: Unary;
            name: "AddObserver";
        };
        addVoter: {
            I: typeof StoragePeer;
            O: typeof AddVoterResponse;
            kind: Unary;
            name: "AddVoter";
        };
        bootstrap: {
            I: typeof BootstrapRequest;
            O: typeof BootstrapResponse;
            kind: Unary;
            name: "Bootstrap";
        };
        deleteValue: {
            I: typeof DeleteValueRequest;
            O: typeof DeleteValueResponse;
            kind: Unary;
            name: "DeleteValue";
        };
        demoteVoter: {
            I: typeof StoragePeer;
            O: typeof DemoteVoterResponse;
            kind: Unary;
            name: "DemoteVoter";
        };
        getLeader: {
            I: typeof GetLeaderRequest;
            O: typeof StoragePeer;
            kind: Unary;
            name: "GetLeader";
        };
        getPeers: {
            I: typeof GetPeersRequest;
            O: typeof StoragePeers;
            kind: Unary;
            name: "GetPeers";
        };
        getStatus: {
            I: typeof StorageStatusRequest;
            O: typeof StorageStatus;
            kind: Unary;
            name: "GetStatus";
        };
        getValue: {
            I: typeof GetValueRequest;
            O: typeof GetValueResponse;
            kind: Unary;
            name: "GetValue";
        };
        listKeys: {
            I: typeof ListKeysRequest;
            O: typeof ListKeysResponse;
            kind: Unary;
            name: "ListKeys";
        };
        listValues: {
            I: typeof ListValuesRequest;
            O: typeof ListValuesResponse;
            kind: Unary;
            name: "ListValues";
        };
        putValue: {
            I: typeof PutValueRequest;
            O: typeof PutValueResponse;
            kind: Unary;
            name: "PutValue";
        };
        removePeer: {
            I: typeof StoragePeer;
            O: typeof RemoveServerResponse;
            kind: Unary;
            name: "RemovePeer";
        };
        subscribePrefix: {
            I: typeof SubscribePrefixRequest;
            O: typeof PrefixEvent;
            kind: ServerStreaming;
            name: "SubscribePrefix";
        };
    }
    • Readonly addObserver: {
          I: typeof StoragePeer;
          O: typeof AddObserverResponse;
          kind: Unary;
          name: "AddObserver";
      }

      AddObserver adds an observer to the storage. The underlying implementation should ensure that the observer is added to the storage and that the storage is in a consistent state before returning. If observers are not supported the underlying implementation can silently ignore this RPC, but it should keep track of the observer in the GetStatus RPC if possible.

      Generated

      from rpc v1.StorageProviderPlugin.AddObserver

    • Readonly addVoter: {
          I: typeof StoragePeer;
          O: typeof AddVoterResponse;
          kind: Unary;
          name: "AddVoter";
      }

      AddVoter adds a voter to the storage. The underlying implementation should ensure that the voter is added to the storage and that the storage is in a consistent state before returning.

      Generated

      from rpc v1.StorageProviderPlugin.AddVoter

    • Readonly bootstrap: {
          I: typeof BootstrapRequest;
          O: typeof BootstrapResponse;
          kind: Unary;
          name: "Bootstrap";
      }

      Bootstrap is called when the storage is created for the first time. It is assumed that this node has been elected as the leader of the cluster. FailedPrecondition should be returned if the storage is already bootstrapped.

      Generated

      from rpc v1.StorageProviderPlugin.Bootstrap

    • Readonly deleteValue: {
          I: typeof DeleteValueRequest;
          O: typeof DeleteValueResponse;
          kind: Unary;
          name: "DeleteValue";
      }

      DeleteValue deletes a value for a key.

      Generated

      from rpc v1.StorageProviderPlugin.DeleteValue

    • Readonly demoteVoter: {
          I: typeof StoragePeer;
          O: typeof DemoteVoterResponse;
          kind: Unary;
          name: "DemoteVoter";
      }

      DemoteVoter demotes a voter to an observer. The underlying implementation should ensure that the voter is demoted and that the storage is in a consistent state before returning. If observers are not supported the underlying implementation can silently ignore this RPC, but it should keep track of the observer in the GetStatus RPC if possible.

      Generated

      from rpc v1.StorageProviderPlugin.DemoteVoter

    • Readonly getLeader: {
          I: typeof GetLeaderRequest;
          O: typeof StoragePeer;
          kind: Unary;
          name: "GetLeader";
      }

      GetLeader returns the leader of the storage. Leader may be loosely defined by the implementation, but must be a node that can reliably be used to mutate the storage.

      Generated

      from rpc v1.StorageProviderPlugin.GetLeader

    • Readonly getPeers: {
          I: typeof GetPeersRequest;
          O: typeof StoragePeers;
          kind: Unary;
          name: "GetPeers";
      }

      GetPeers returns all peers of the storage. Peer status may be loosely defined by the implementation, but must correlate to nodes that can reliably be used to mutate the storage.

      Generated

      from rpc v1.StorageProviderPlugin.GetPeers

    • Readonly getStatus: {
          I: typeof StorageStatusRequest;
          O: typeof StorageStatus;
          kind: Unary;
          name: "GetStatus";
      }

      GetStatus returns the status of the storage.

      Generated

      from rpc v1.StorageProviderPlugin.GetStatus

    • Readonly getValue: {
          I: typeof GetValueRequest;
          O: typeof GetValueResponse;
          kind: Unary;
          name: "GetValue";
      }

      GetValue returns the value for a key.

      Generated

      from rpc v1.StorageProviderPlugin.GetValue

    • Readonly listKeys: {
          I: typeof ListKeysRequest;
          O: typeof ListKeysResponse;
          kind: Unary;
          name: "ListKeys";
      }

      ListKeys lists all keys for a prefix.

      Generated

      from rpc v1.StorageProviderPlugin.ListKeys

    • Readonly listValues: {
          I: typeof ListValuesRequest;
          O: typeof ListValuesResponse;
          kind: Unary;
          name: "ListValues";
      }

      ListValues lists all values for a prefix.

      Generated

      from rpc v1.StorageProviderPlugin.ListValues

    • Readonly putValue: {
          I: typeof PutValueRequest;
          O: typeof PutValueResponse;
          kind: Unary;
          name: "PutValue";
      }

      PutValue puts a value for a key.

      Generated

      from rpc v1.StorageProviderPlugin.PutValue

    • Readonly removePeer: {
          I: typeof StoragePeer;
          O: typeof RemoveServerResponse;
          kind: Unary;
          name: "RemovePeer";
      }

      RemovePeer removes a peer from the storage. The underlying implementation should ensure that the server is removed and that the storage is in a consistent state before returning. When called with the current ID of the leader, the underlying implementation should relinquish leadership to another peer if possible.

      Generated

      from rpc v1.StorageProviderPlugin.RemovePeer

    • Readonly subscribePrefix: {
          I: typeof SubscribePrefixRequest;
          O: typeof PrefixEvent;
          kind: ServerStreaming;
          name: "SubscribePrefix";
      }

      SubscribePrefix subscribes to events for a prefix.

      Generated

      from rpc v1.StorageProviderPlugin.SubscribePrefix

  • Readonly typeName: "v1.StorageProviderPlugin"

Generated

from service v1.StorageProviderPlugin

Generated using TypeDoc