proxyctl

package
v0.0.0-...-2515fb6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateStopped        ProxyState = 0
	StateWaitingForPkey            = 1
	StateRunning                   = 2
	StateStopping                  = 3
)
View Source
const (
	MORDecimals = 18
	ETHDecimals = 18
)

Variables

View Source
var (
	MORBalanceThreshold = *lib.Exp10(MORDecimals)     // 1 MOR the balance to show a warning
	ETHBalanceThreshold = *lib.Exp10(ETHDecimals - 1) // 0.1 ETH the balance to show a warning
)

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy is a struct that represents a proxy-router part of the system

func NewProxyCtl

func NewProxyCtl(eventListerer *blockchainapi.EventsListener, wallet interfaces.PrKeyProvider, chainID *big.Int, log *lib.Logger, connLog *lib.Logger, proxyAddr string, scl SchedulerLogFactory, sessionStorage *storages.SessionStorage, modelConfigLoader *config.ModelConfigLoader, valid *validator.Validate, aiEngine *aiengine.AiEngine, blockchainService *blockchainapi.BlockchainService, sessionRepo *sessionrepo.SessionRepositoryCached, sessionExpiryHandler *blockchainapi.SessionExpiryHandler) *Proxy

NewProxyCtl creates a new Proxy controller instance

func (*Proxy) GetState

func (p *Proxy) GetState() ProxyState

func (*Proxy) Run

func (p *Proxy) Run(ctx context.Context) error

func (*Proxy) ServerStarted

func (p *Proxy) ServerStarted() <-chan struct{}

type ProxyState

type ProxyState int8

func (ProxyState) String

func (s ProxyState) String() string

type SchedulerLogFactory

type SchedulerLogFactory = func(remoteAddr string) (lib.ILogger, error)

Jump to

Keyboard shortcuts

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