server

package
v0.0.0-...-0f47a2f Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: ISC Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZeroAddress = common.HexToAddress("")

ZeroAddress defines an empty address value.

Functions

func UseLogger

func UseLogger(sLogger btclog.Logger)

UseLogger sets the subsystem logs to use the provided loggers.

Types

type ServerConfig

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

ServerConfig defines the configuration needed to run a TLS enabled server that interacts with the contract backend.

func NewServer

func NewServer(ctx context.Context, port uint16, certfile, keyfile, datadir,
	network, serverURL, dbHost, dbName, dbUser, dbPassword string,
) (*ServerConfig, error)

NewServer validates the deployment configuration information before creating a sapphire client wrapped around an eth client.

func (*ServerConfig) Run

func (s *ServerConfig) Run() error

Run the actual TLS server instance using mTLS where both server and client must share their certificates.

func (*ServerConfig) SyncData

func (s *ServerConfig) SyncData() error

SyncData polls for the historical events data in a blocking operation before shifting to poll for future blocks asynchronously.

Jump to

Keyboard shortcuts

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