github.com/Cloud-Foundations/Dominator@v0.3.4/sub/client/api.go (about) 1 package client 2 3 import ( 4 "io" 5 6 "github.com/Cloud-Foundations/Dominator/lib/hash" 7 "github.com/Cloud-Foundations/Dominator/lib/srpc" 8 "github.com/Cloud-Foundations/Dominator/proto/sub" 9 ) 10 11 func BoostCpuLimit(client *srpc.Client) error { 12 return boostCpuLimit(client) 13 } 14 15 func CallFetch(client *srpc.Client, request sub.FetchRequest, 16 reply *sub.FetchResponse) error { 17 return callFetch(client, request, reply) 18 } 19 20 func CallPoll(client *srpc.Client, request sub.PollRequest, 21 reply *sub.PollResponse) error { 22 return callPoll(client, request, reply) 23 } 24 25 func CallUpdate(client *srpc.Client, request sub.UpdateRequest, 26 reply *sub.UpdateResponse) error { 27 return callUpdate(client, request, reply) 28 } 29 30 func Cleanup(client *srpc.Client, hashes []hash.Hash) error { 31 return cleanup(client, hashes) 32 } 33 34 func Fetch(client *srpc.Client, serverAddress string, 35 hashes []hash.Hash) error { 36 return fetch(client, serverAddress, hashes) 37 } 38 39 func GetConfiguration(client *srpc.Client) (sub.Configuration, error) { 40 return getConfiguration(client) 41 } 42 43 func GetFiles(client *srpc.Client, filenames []string, 44 readerFunc func(reader io.Reader, size uint64) error) error { 45 return getFiles(client, filenames, readerFunc) 46 } 47 48 func SetConfiguration(client *srpc.Client, config sub.Configuration) error { 49 return setConfiguration(client, config) 50 }