Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a reslient upload client.
type ClientOptions ¶
type ClientOptions struct { // NumConnections is the number of concurrent connections to use when uploading chunks. NumConnections int // ChunkSizeBytes is the size of each chunk. ChunkSizeBytes int64 // MaxRetryAttempts is the maximum number of times to retry a failed request. MaxRetryAttempts int // RequestTimeout is the timeout to use when making requests (eg. dialing, TLS handshake, etc). RequestTimeout time.Duration // TLSClientConfig is the optional TLS configuration to use when making requests. TLSClientConfig *tls.Config }
ClientOptions are options for configuring the behavior of the upload client.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a windlass files server.
func NewServer ¶
func NewServer(logger *slog.Logger, fsys writablefs.FS, opts ...ServerOption) *Server
type ServerOption ¶ added in v0.7.0
type ServerOption func(*Server)
ServerOption is an option for configuring a windlass server.
func WithStagingFS ¶ added in v0.7.2
func WithStagingFS(fsys writablefs.FS) ServerOption
WithTempFS sets the temporary filesystem to use for storing partial uploads. If not provided, the default is to use the default filesystem. This is useful filesystems that only support immutable objects/files.
Click to show internal directories.
Click to hide internal directories.