router

package
v0.0.0-...-0fbfc04 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTPSPort                     = 443
	DefaultACMEServerReadTimeout  = 5 * time.Second
	DefaultACMEServerWriteTimeout = 5 * time.Second

	DefaultPort               = 8822
	DefaultConnectionsLimit   = 10000
	DefaultRouterReadTimeout  = 15
	DefaultRouterWriteTimeout = 15

	WSID     = "wsid"
	AppOwner = "appOwner"
	AppName  = "appName"

	ResourceName = "resourceName"
)

Variables

This section is empty.

Functions

func Provide

func Provide(vvmCtx context.Context, rp RouterParams, aBusTimeout time.Duration, broker in10n.IN10nBroker, bp *BlobberParams, autocertCache autocert.Cache,
	bus ibus.IBus, numsAppsWorkspaces map[istructs.AppQName]istructs.NumAppWorkspaces) (httpSrv IHTTPService, acmeSrv IACMEService)

port == 443 -> httpsService + ACMEService, otherwise -> HTTPService only, ACMEService is nil

func RequestHandler

func RequestHandler(bus ibus.IBus, busTimeout time.Duration, numsAppsWorkspaces map[istructs.AppQName]istructs.NumAppWorkspaces) http.HandlerFunc

func WriteTextResponse

func WriteTextResponse(w http.ResponseWriter, msg string, code int)

Types

type BLOBMaxSizeType

type BLOBMaxSizeType int64

type BlobberParams

type BlobberParams struct {
	ServiceChannels []iprocbusmem.ChannelGroup
	BLOBStorage     iblobstorage.IBLOBStorage
	BLOBWorkersNum  int

	RetryAfterSecondsOn503 int
	BLOBMaxSize            BLOBMaxSizeType
	// contains filtered or unexported fields
}

type BlobberServiceChannels

type BlobberServiceChannels []iprocbusmem.ChannelGroup

type IACMEService

type IACMEService interface {
	pipeline.IService
}

type IHTTPService

type IHTTPService interface {
	pipeline.IService
	GetPort() int
}

Jump to

Keyboard shortcuts

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