http

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package http implements a HTTP-based hook system. For each hook event, it will send a POST request to the specified endpoint. The body is a JSON-formatted object including the hook type, upload and request information. By responding with a JSON object, the response from tusd can be controlled.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpHook

type HttpHook struct {
	Endpoint       string
	MaxRetries     int
	Backoff        time.Duration
	ForwardHeaders []string
	// contains filtered or unexported fields
}

func (HttpHook) InvokeHook

func (h HttpHook) InvokeHook(hookReq hooks.HookRequest) (hookRes hooks.HookResponse, err error)

func (*HttpHook) Setup

func (h *HttpHook) Setup() error

Jump to

Keyboard shortcuts

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