Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxInstructionSize = 100 * 1024 // 100 KB MaxActionSize = 1024 * 1024 // 1 MB )
View Source
const ( SetProxyURLEndpoint = "/proxy" ProxyURLEnvVar = "PROXY_URL" SetInitialOwnerEndpoint = "/initial-owner" InitialOwnerEnvVar = "INITIAL_OWNER" SetExtensionIDEndpoint = "/extension-id" ExtensionIDEnvVar = "EXTENSION_ID" )
View Source
const EncodingVersion = "1.0.0"
View Source
const ProxyTimeout = 2 * time.Second
Variables ¶
View Source
var ( // Modes: // - 0 production, // - 1 local (no attestation) Mode = 1 LogLevel = "FATAL" ConfigPort = 5500 // For node configuration. SignPort = 8888 // For signing action results received from extensions. ExtensionPort = 8889 // Extension's port that accepts actions. TestPlatform, _ = convert.StringToCommonHash("TEST_PLATFORM") TestCodeHash = common.HexToHash("194844cf417dde867073e5ab7199fa4d21fd82b5dbe2bdea8b3d7fc18d10fdc2") DefaultExtensionID = common.MaxHash )
View Source
var QueuedActionsSleepTime = 100 * time.Millisecond
Processor configuration
Functions ¶
This section is empty.
Types ¶
type ConfigServer ¶
type ConfigServer struct {
ProxyURL *ProxyURLMutex
// contains filtered or unexported fields
}
func NewConfigServer ¶
func NewConfigServer(port int, configurer Configurer) *ConfigServer
NewConfigServer creates an HTTP server that accepts proxy configuration requests on the provided port and exposes the configured URL via ProxyURL.
func (*ConfigServer) Close ¶
func (pc *ConfigServer) Close(ctx context.Context) error
Close gracefully shuts down the proxy configuration server.
func (*ConfigServer) Serve ¶
func (pc *ConfigServer) Serve() error
Serve starts the proxy configuration server and blocks until it stops.
type Configurer ¶
type ProxyURLMutex ¶
Click to show internal directories.
Click to hide internal directories.