gitlab.com/SkynetLabs/skyd@v1.6.9/skymodules/renter/rpcclient.go (about) 1 package renter 2 3 import ( 4 "go.sia.tech/siad/modules" 5 "go.sia.tech/siad/types" 6 ) 7 8 // TODO: The RPC client is used by the worker to interact with the host. It 9 // holds the RPC price table and can be seen as a renter RPC session. For now 10 // this is extracted in a separate object, quite possible though this state will 11 // move to the worker, and the RPCs will be exposed as static functions, 12 // callable by the worker. 13 14 // RPCClient interface lists all possible RPC that can be called on the host 15 type RPCClient interface { 16 // UpdatePriceTable updates the price table. 17 UpdatePriceTable() error 18 // FundEphemeralAccount funds the given ephemeral account by given amount. 19 FundEphemeralAccount(id modules.AccountID, amount types.Currency) error 20 } 21 22 // MockRPCClient mocks the RPC Client 23 type MockRPCClient struct{} 24 25 // FundEphemeralAccount funds the given ephemeral account by given amount. 26 func (m *MockRPCClient) FundEphemeralAccount(id modules.AccountID, amount types.Currency) error { 27 return nil 28 } 29 30 // UpdatePriceTable updates the price table. 31 func (m *MockRPCClient) UpdatePriceTable() error { return nil }