routing

package
v0.0.0-...-9835270 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: AGPL-3.0, Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NetDiskDownLoad

func NetDiskDownLoad(
	w http.ResponseWriter,
	req *http.Request,
	service string,
	mediaID mediatypes.MediaID,
	fileType string,
	cfg *config.Dendrite,
	rpcCli *common.RpcClient,
	idg *uid.UidGenerator,
	useFed bool,
) int

func NetDiskUpLoad

func NetDiskUpLoad(
	req *http.Request,
	cfg *config.Dendrite,
	device *authtypes.Device,
) util.JSONResponse

func Setup

func Setup(
	apiMux *mux.Router,
	cfg config.Dendrite,
	cacheIn service.Cache,
	rpcCli *common.RpcClient,
	rsRpcCli roomserverapi.RoomserverRPCAPI,
	tokenFilter *filter.SimpleFilter,
	feddomains *common.FedDomains,
	keyDB model.KeyDatabase,
)

Setup registers HTTP handlers with the given ServeMux. It also supplies the given http.Client to clients which need to make outbound HTTP requests.

Types

type CombineReader

type CombineReader struct {
	// contains filtered or unexported fields
}

func (*CombineReader) Read

func (r *CombineReader) Read(p []byte) (n int, err error)

type HttpProcessor

type HttpProcessor struct {
	// contains filtered or unexported fields
}

func NewHttpProcessor

func NewHttpProcessor(
	r *mux.Router, cfg config.Dendrite,
	cacheIn service.Cache, rpcCli *common.RpcClient,
	rsRpcCli roomserverapi.RoomserverRPCAPI, tokenFilter *filter.SimpleFilter,
	idg *uid.UidGenerator,
	histogram mon.LabeledHistogram,
	feddomains *common.FedDomains,
	keyDB model.KeyDatabase,

) *HttpProcessor

func (*HttpProcessor) FilterRequest

func (w *HttpProcessor) FilterRequest(req *gomatrixserverlib.FederationRequest) bool

func (*HttpProcessor) OnMessage

func (w *HttpProcessor) OnMessage(topic string, partition int32, data []byte)

func (*HttpProcessor) ProcessInput

func (w *HttpProcessor) ProcessInput(req *http.Request, coder core.Coder, processor apiconsumer.APIProcessor, device *authtypes.Device, topic string) util.JSONResponse

func (*HttpProcessor) Route

func (w *HttpProcessor) Route(path, metricsName, topic string, msgType int32, apiType int8, methods ...string)

func (*HttpProcessor) Start

func (w *HttpProcessor) Start()

type MsgProcessor

type MsgProcessor interface {
	ProcessInput(coder core.Coder) util.JSONResponse
}

Jump to

Keyboard shortcuts

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