server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ServiceStatusOk indicates that the system is running as expected
	ServiceStatusOk = "OK"
)

Functions

func NewBoostRPCServer

func NewBoostRPCServer(opts BoostRPCServerOptions) (*http.Server, error)

NewBoostRPCServer creates a new boost server

func NewHTTPServer

func NewHTTPServer(ctx context.Context, log logrus.Ext1FieldLogger, rpcSrv *gethRpc.Server, addr string, timeout Timeout, cors []string) *http.Server

NewHTTPServer creates a new HTTP server interface for a RPC server

func NewRPCServer

func NewRPCServer(namespace string, backend interface{}, authenticated bool) (*gethRpc.Server, error)

NewRPCServer creates a new RPC server

Types

type BoostRPCServerOptions

type BoostRPCServerOptions struct {
	ListenAddr string
	RelayURLs  []string
	Cors       []string
	Log        *logrus.Entry

	GetHeaderTimeout   time.Duration // maximum wait time for a relay response to getHeaderV1
	UserRequestTimeout Timeout
}

BoostRPCServerOptions contains the router configuration for NewRouter

type BoostService

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

BoostService TODO

func NewBoostService

func NewBoostService(relayURLs []string, log *logrus.Entry, getHeaderTimeout time.Duration) (*BoostService, error)

NewBoostService created a new BoostService

func (*BoostService) GetHeaderV1

func (m *BoostService) GetHeaderV1(ctx context.Context, slot hexutil.Uint64, pubkey hexutil.Bytes, hash common.Hash) (*types.GetHeaderResponse, error)

GetHeaderV1 TODO

func (*BoostService) GetPayloadV1

func (m *BoostService) GetPayloadV1(ctx context.Context, block types.BlindBeaconBlockV1, signature hexutil.Bytes) (*types.ExecutionPayloadV1, error)

GetPayloadV1 TODO

func (*BoostService) RegisterValidatorV1

func (m *BoostService) RegisterValidatorV1(ctx context.Context, message types.RegisterValidatorRequestMessage, signature hexutil.Bytes) (*string, error)

RegisterValidatorV1 - returns OK if at least one relay returns true

func (*BoostService) Status

func (m *BoostService) Status(ctx context.Context) (*string, error)

Status implements the builder_status RPC method

type Timeout

type Timeout struct {
	Read       time.Duration // Timeout for body reads. None if 0.
	ReadHeader time.Duration // Timeout for header reads. None if 0.
	Write      time.Duration // Timeout for writes. None if 0.
	Idle       time.Duration // Timeout to disconnect idle client connections. None if 0.
}

Timeout is used to configure the RPC server timeouts for user requests

Jump to

Keyboard shortcuts

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