github.com/cloud-foundations/dominator@v0.0.0-20221004181915-6e4fee580046/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 Cleanup(client *srpc.Client, hashes []hash.Hash) error { 16 return cleanup(client, hashes) 17 } 18 19 func Fetch(client *srpc.Client, serverAddress string, 20 hashes []hash.Hash) error { 21 return fetch(client, serverAddress, hashes) 22 } 23 24 func GetConfiguration(client *srpc.Client) (sub.Configuration, error) { 25 return getConfiguration(client) 26 } 27 28 func CallPoll(client *srpc.Client, request sub.PollRequest, 29 reply *sub.PollResponse) error { 30 return callPoll(client, request, reply) 31 } 32 33 func SetConfiguration(client *srpc.Client, config sub.Configuration) error { 34 return setConfiguration(client, config) 35 } 36 37 func CallUpdate(client *srpc.Client, request sub.UpdateRequest, 38 reply *sub.UpdateResponse) error { 39 return callUpdate(client, request, reply) 40 } 41 42 func GetFiles(client *srpc.Client, filenames []string, 43 readerFunc func(reader io.Reader, size uint64) error) error { 44 return getFiles(client, filenames, readerFunc) 45 }