Documentation ¶
Index ¶
- func Fuzz(data []byte) int
- func PrettyUuidAndHash(d []byte) string
- type BulkClient
- func (c BulkClient) Close() error
- func (c *BulkClient) Execute() error
- func (c *BulkClient) Get(K cache.Kind, uuidAndHash []byte) error
- func (c *BulkClient) GetCallback(callback func(K cache.Kind, uuidAndHash []byte, hit bool, data io.Reader))
- func (c BulkClient) NegotiateVersion(my uint32) (uint32, error)
- func (c *BulkClient) Put(uuidAndHash []byte, i *PutObject, a *PutObject, r *PutObject)
- func (c BulkClient) Quit() error
- type PutObject
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrettyUuidAndHash ¶
Types ¶
type BulkClient ¶
type BulkClient struct { Conn io.ReadWriteCloser Callback func(K cache.Kind, uuidAndHash []byte, hit bool, data io.Reader) // contains filtered or unexported fields }
BulkClient sends requests in bulk, like Unity does. That is, it sends *all* get-requests before it begins reading responses.
func NewBulkClientConn ¶
func NewBulkClientConn(conn io.ReadWriteCloser) *BulkClient
func (BulkClient) Close ¶
func (c BulkClient) Close() error
Close the connection. Unpolite, I guess, but that's what Unity is observed to do in the wild.
func (*BulkClient) Execute ¶
func (c *BulkClient) Execute() error
func (*BulkClient) Get ¶
func (c *BulkClient) Get(K cache.Kind, uuidAndHash []byte) error
Enqueue a get-request and wait for response to show up
func (*BulkClient) GetCallback ¶
func (c *BulkClient) GetCallback(callback func(K cache.Kind, uuidAndHash []byte, hit bool, data io.Reader))
Callback that will get replies for get-requests
func (BulkClient) NegotiateVersion ¶
func (c BulkClient) NegotiateVersion(my uint32) (uint32, error)
func (*BulkClient) Put ¶
func (c *BulkClient) Put(uuidAndHash []byte, i *PutObject, a *PutObject, r *PutObject)
Putting data
func (BulkClient) Quit ¶
func (c BulkClient) Quit() error
Gracefully quit the current connection and close down
type PutObject ¶
type PutObject struct {
// contains filtered or unexported fields
}
PUT Objects. A plain reader, but we need a size up-front. TODO: Implement lot's of magic (file sizes, string.NewReader) etc.
Click to show internal directories.
Click to hide internal directories.