Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultExecutorCount = 1 DefaultImageStorage = "filesystem" DefaultImageStateDir = "/var/lib/gate/image" DefaultDatabaseDriver = "sqlite" DefaultInventoryDSN = "file:/var/lib/gate/inventory/inventory.sqlite?cache=shared" DefaultSourceCacheDSN = "file:/var/cache/gate/source/source.sqlite?cache=shared" DefaultNet = "tcp" DefaultHTTPAddr = "localhost:8080" DefaultACMECacheDir = "/var/cache/gate/acme" )
View Source
const DefaultServerName = "gate"
Variables ¶
View Source
var DefaultConfigFiles = []string{
"/etc/gate/server.toml",
"/etc/gate/server.d/*.toml",
}
Functions ¶
func SetHandlerFunc ¶
SetHandlerFunc replaces the function which is invoked for every HTTP request. The registered function should call the next handler's ServeHTTP method to pass the control to the server.
This function has no effect if called after during Main.
Types ¶
type Config ¶
type Config struct {
Runtime struct {
runtime.Config
PrepareProcesses int
ExecutorCount int
}
Image struct {
ProgramStorage string
PreparePrograms int
InstanceStorage string
PrepareInstances int
StateDir string
}
Inventory map[string]database.Config
Service map[string]any
Server struct {
server.Config
IdentityFile string
UID int
GID int
}
Access struct {
Policy string
Public struct{}
SSH struct {
AuthorizedKeys string
}
}
Principal server.AccessConfig
Source struct {
Cache map[string]database.Config
HTTP []struct {
Name string
httpsource.Config
}
IPFS struct {
ipfs.Config
}
}
HTTP struct {
Net string
http.Server
webserver.Config
AccessDB map[string]database.Config
AccessLog string
TLS struct {
Enabled bool
Domains []string
HTTPNet string
HTTPAddr string
}
}
ACME struct {
AcceptTOS bool
CacheDir string
RenewBefore time.Duration
DirectoryURL string
Email string
ForceRSA bool
}
Log struct {
Journal bool
}
}
Click to show internal directories.
Click to hide internal directories.