Documentation
¶
Index ¶
- Variables
- func CreateComposer()
- func DisplayGreeting(w http.ResponseWriter, r *http.Request)
- func NewListener(addr string, readTimeout, writeTimeout time.Duration) (net.Listener, error)
- func ParseFlags()
- func PrepareGreeting()
- func Serve()
- func SetupMetrics(handler *tusd.Handler)
- func SetupPostHooks(handler *tusd.Handler)
- func SetupPreHooks(composer *tusd.StoreComposer)
- func ShowVersion()
- type Conn
- type HookType
- type Listener
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildDate = "n/a"
View Source
var Composer *tusd.StoreComposer
View Source
var Flags struct { HttpHost string HttpPort string MaxSize int64 UploadDir string StoreSize int64 Basepath string Timeout int64 S3Bucket string S3Endpoint string GCSBucket string FileHooksDir string HttpHooksEndpoint string HttpHooksRetry int HttpHooksBackoff int ShowVersion bool ExposeMetrics bool MetricsPath string BehindProxy bool FileHooksInstalled bool HttpHooksInstalled bool }
View Source
var GitCommit = "n/a"
View Source
var MetricsOpenConnections = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "tusd_connections_open",
Help: "Current number of open connections.",
})
View Source
var VersionName = "n/a"
Functions ¶
func CreateComposer ¶
func CreateComposer()
func DisplayGreeting ¶
func DisplayGreeting(w http.ResponseWriter, r *http.Request)
func NewListener ¶
func ParseFlags ¶
func ParseFlags()
func PrepareGreeting ¶
func PrepareGreeting()
func SetupMetrics ¶
func SetupPostHooks ¶
func SetupPreHooks ¶
func SetupPreHooks(composer *tusd.StoreComposer)
func ShowVersion ¶
func ShowVersion()
Types ¶
type Conn ¶
type Conn struct { net.Conn ReadTimeout time.Duration WriteTimeout time.Duration // contains filtered or unexported fields }
Conn wraps a net.Conn, and sets a deadline for every read and write operation.
type Listener ¶
Listener wraps a net.Listener, and gives a place to store the timeout parameters. On Accept, it will wrap the net.Conn with our own Conn for us. Original implementation taken from https://gist.github.com/jbardin/9663312 Thanks! <3
Click to show internal directories.
Click to hide internal directories.