objectserver

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddObjectRequest

type AddObjectRequest struct {
	Length       uint64
	ExpectedHash *hash.Hash

} // Object data are streamed afterwards.

The AddObjects() RPC requires the client to send a stream of AddObjectRequest objects in Gob format. To signify the end of the stream, the client should send an AddObjectRequest object with .Length == 0. The server will send one AddObjectResponse for each AddObjectRequest, but it will not flush the connection until the client signals the end of the stream.

type AddObjectResponse

type AddObjectResponse struct {
	ErrorString string
	Hash        hash.Hash
	Added       bool // If true: object was added, else object already existed.
}

type CheckObjectsRequest

type CheckObjectsRequest struct {
	Hashes []hash.Hash
}

type CheckObjectsResponse

type CheckObjectsResponse struct {
	ObjectSizes []uint64 // size == 0: object not found.
}

type GetObjectsRequest

type GetObjectsRequest struct {
	Exclusive bool // For initial performance benchmarking only.
	Hashes    []hash.Hash
}

This is used in the special GetObjects streaming HTTP/RPC protocol.

type GetObjectsResponse

type GetObjectsResponse struct {
	ResponseString string
	ObjectSizes    []uint64

} // Object datas are streamed afterwards.

type TestBandwidthRequest

type TestBandwidthRequest struct {
	Duration     time.Duration // Ignored when sending to server.
	ChunkSize    uint          // Maximum permitted: 65535.
	SendToServer bool

} // The transmitter sends chunks of random data with a marker byte after each.

type TestBandwidthResponse

type TestBandwidthResponse struct {
	ServerDuration time.Duration
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL