cli

package
v2.0.0-...-a21236f Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TLS13       = "tls13"
	TLS12       = "tls12"
	TLS12STRONG = "tls12-strong"
)

Variables

View Source
var BuildDate = "n/a"
View Source
var Flags struct {
	HttpHost                         string
	HttpPort                         string
	HttpSock                         string
	MaxSize                          int64
	UploadDir                        string
	Basepath                         string
	ShowGreeting                     bool
	DisableDownload                  bool
	DisableTermination               bool
	DisableCors                      bool
	CorsAllowOrigin                  string
	CorsAllowCredentials             bool
	CorsAllowMethods                 string
	CorsAllowHeaders                 string
	CorsMaxAge                       string
	CorsExposeHeaders                string
	NetworkTimeout                   time.Duration
	S3Bucket                         string
	S3ObjectPrefix                   string
	S3Endpoint                       string
	S3PartSize                       int64
	S3MaxBufferedParts               int64
	S3DisableContentHashes           bool
	S3DisableSSL                     bool
	S3ConcurrentPartUploads          int
	GCSBucket                        string
	GCSObjectPrefix                  string
	AzStorage                        string
	AzContainerAccessType            string
	AzBlobAccessTier                 string
	AzObjectPrefix                   string
	AzEndpoint                       string
	EnabledHooksString               string
	PluginHookPath                   string
	FileHooksDir                     string
	HttpHooksEndpoint                string
	HttpHooksForwardHeaders          string
	HttpHooksRetry                   int
	HttpHooksBackoff                 time.Duration
	GrpcHooksEndpoint                string
	GrpcHooksRetry                   int
	GrpcHooksBackoff                 time.Duration
	EnabledHooks                     []hooks.HookType
	ProgressHooksInterval            time.Duration
	ShowVersion                      bool
	ExposeMetrics                    bool
	MetricsPath                      string
	ExposePprof                      bool
	PprofPath                        string
	PprofBlockProfileRate            int
	PprofMutexProfileRate            int
	BehindProxy                      bool
	VerboseOutput                    bool
	S3TransferAcceleration           bool
	TLSCertFile                      string
	TLSKeyFile                       string
	TLSMode                          string
	ShutdownTimeout                  time.Duration
	AcquireLockTimeout               time.Duration
	FilelockHolderPollInterval       time.Duration
	FilelockAcquirerPollInterval     time.Duration
	GracefulRequestCompletionTimeout time.Duration
	ExperimentalProtocol             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 NewListener(addr string) (net.Listener, error)

func NewUnixListener

func NewUnixListener(path string) (net.Listener, error)

Binds to a UNIX socket. If the file already exists, try to remove it before binding again. This logic is borrowed from Gunicorn (see https://github.com/benoitc/gunicorn/blob/a8963ef1a5a76f3df75ce477b55fe0297e3b617d/gunicorn/sock.py#L106)

func ParseFlags

func ParseFlags()

func PrepareGreeting

func PrepareGreeting()

func Serve

func Serve()

Setups the different components, starts a Listener and give it to http.Serve().

By default it will bind to the specified host/port, unless a UNIX socket is specified, in which case a different socket creation and binding mechanism is put in place.

func SetEnabledHooks

func SetEnabledHooks()

func SetupMetrics

func SetupMetrics(mux *http.ServeMux, handler *handler.Handler)

func SetupPprof

func SetupPprof(globalMux *http.ServeMux)

func SetupStructuredLogger

func SetupStructuredLogger()

func ShowVersion

func ShowVersion()

Types

This section is empty.

Jump to

Keyboard shortcuts

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