server

package
v0.0.0-...-a8e80a0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidBody = fmt.Errorf("%w: invalid body", status.HTTP[400])

Functions

This section is empty.

Types

type External

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

func NewExternal

func NewExternal(
	port string,
	instructionService *instruction.Service,
	resultService ResultService,
	teeInfo *info.Service,
	wallet *wallets.Service,
	privateKey *ecdsa.PrivateKey,
	enableDirect bool,
	actionQueues *queue.ActionQueues,
	apiKey string,
) *External

func (*External) Close

func (e *External) Close(ctx context.Context) error

Close gracefully closes the server.

func (*External) Serve

func (e *External) Serve() error

Serve starts the server.

type Internal

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

func NewInternal

func NewInternal(port string,
	actionQueues *queue.ActionQueues,
	resultService ResultService,
	wallet *wallets.Service,
	liveness liveness,
) *Internal

func (*Internal) Close

func (i *Internal) Close(ctx context.Context) error

Close gracefully closes the server.

func (*Internal) Serve

func (i *Internal) Serve() error

Serve starts the server.

type ResultService

type ResultService interface {
	ProcessAndStore(context.Context, *types.ActionResponse) error
	Serve(context.Context, common.Hash, types.SubmissionTag) (*types.ActionResponse, error)
}

Jump to

Keyboard shortcuts

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