Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DEV = false

	ErrorKind      = "Error"
	CompileKind    = "Compile"
	PackageKind    = "Package"
	DeployKind     = "Deploy"
	ShareKind      = "Share"
	HintsKind      = "Hints"
	WasmDeployKind = "WasmDeploy"
)
View Source
const (
	Jsgo  = "jsgo"
	Wasm  = "wasm"
	Play  = "play"
	Frizz = "frizz"
	Index = "index"
	Pkg   = "pkg"
	Src   = "src"
	Git   = "git"
)
View Source
const (
	LocalFileserverTempDir = "~/.jsgo-local"

	// ProjectId is the ID of the GCS project
	ProjectID = "jsgo-192815"

	// CompileHost is the domain of the compile server
	CompileHost = "compile.jsgo.io"

	// MaxConcurrentCompiles is the maximum number of concurrent compile jobs per server
	MaxConcurrentCompiles = 2

	// MaxQueue is the maximum queue length waiting for compile. After this an error is returned.
	MaxQueue = 100

	AssetsFilename = "assets.zip"

	// WriteTimeout is the timeout when serving static files
	WriteTimeout = time.Second * 2

	// CompileTimeout is the timeout when compiling a package.
	RequestTimeout = time.Second * 300

	// PageTimeout is the timeout when generating the compile page
	PageTimeout = time.Second * 5

	// ServerShutdownTimeout is the timeout when doing a graceful server shutdown
	ServerShutdownTimeout = time.Second * 5

	// WebsocketPingPeriod is the interval between pings. Must be less than WebsocketPongTimeout.
	WebsocketPingPeriod = time.Second * 10

	// WebsocketPongTimeout is the time to wait for a pong from the client before cancelling
	WebsocketPongTimeout = time.Second * 20

	// WebsocketWriteTimeout is the write timeout for websockets
	WebsocketWriteTimeout = time.Second * 20

	// WebsocketInstructionTimeout is the time to wait for instructions from the client (e.g. during
	// playground compile)
	WebsocketInstructionTimeout = time.Second * 5

	// HttpTimeout is the time to wait for HTTP operations (e.g. getting meta data - not git)
	HttpTimeout = time.Second * 5

	ConcurrentStorageUploads = 10
)
View Source
const (
	LOCAL = false
)

Variables

View Source
var Bucket = map[string]string{
	Src:   "src.jsgo.io",
	Pkg:   "pkg.jsgo.io",
	Index: "jsgo.io",
	Git:   "git.jsgo.io",
}
View Source
var DeployerConfig = deployer.Config{
	ConcurrentStorageUploads: ConcurrentStorageUploads,
	IndexBucket:              Bucket[Index],
	PkgBucket:                Bucket[Pkg],
	PkgProtocol:              Protocol[Pkg],
	PkgHost:                  Host[Pkg],
}
View Source
var GitFetcherConfig = gitfetcher.Config{
	GitSaveTimeout:  time.Second * 300,
	GitCloneTimeout: time.Second * 300,
	GitMaxObjects:   250000,
	GitBucket:       Bucket[Git],
}
View Source
var Host = map[string]string{
	Jsgo:  "compile.jsgo.io",
	Play:  "play.jsgo.io",
	Frizz: "frizz.io",
	Wasm:  "wasm.jsgo.io",
	Src:   "src.jsgo.io",
	Pkg:   "pkg.jsgo.io",
	Index: "jsgo.io",
}
View Source
var Protocol = map[string]string{
	Jsgo:  "https",
	Play:  "https",
	Frizz: "https",
	Wasm:  "https",
	Src:   "https",
	Pkg:   "https",
	Index: "https",
}
View Source
var Static = []string{Src, Pkg, Index}
View Source
var ValidExtensions = []string{".go", ".jsgo.html", ".inc.js", ".md"}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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