Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultPort is the port the reflector server listens on if not passed in. DefaultPort = 5566 // DefaultTimeout is the default timeout to read or write the next message DefaultTimeout = 5 * time.Second )
Variables ¶
View Source
var ErrBlobExists = errors.Base("blob exists on server")
ErrBlobExists is a default error for when a blob already exists on the reflector server.
View Source
var ErrBlobTooBig = errors.Base("blob must be at most %d bytes", maxBlobSize)
Functions ¶
func BlobHash ¶ added in v1.0.2
BlobHash returns the sha512 hash hex encoded string of the blob byte slice.
func IsValidJSON ¶ added in v1.1.0
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an instance of a client connected to a server.
type Server ¶
type Server struct { Timeout time.Duration // timeout to read or write next message EnableBlocklist bool // if true, blocklist checking and blob deletion will be enabled // contains filtered or unexported fields }
Server is and instance of the reflector server. It houses the blob store and listener.
type Uploader ¶ added in v1.1.0
type Uploader struct {
// contains filtered or unexported fields
}
func NewUploader ¶ added in v1.1.0
func (*Uploader) GetSummary ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.