settings

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxInstructionSize     = 100 * 1024       // 100 KB
	MaxActionSize          = 10 * 1024 * 1024 // 10 MB
	MaxFetchResponseSize   = 10 * 1024 * 1024 // 10 MB - limits the total size of a fetched action response
	MaxVariableMessageSize = 1024 * 1024      // 1 MB - limits the total size of all aggregated variable messages
)
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 Configurer interface {
	SetOwner(common.Address) error
	SetExtensionID(common.Hash) error
}

type ProxyURLMutex

type ProxyURLMutex struct {
	URL string

	sync.RWMutex
}

Jump to

Keyboard shortcuts

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