rest

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 35 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse added in v0.1.4

type APIResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message,omitempty"`
}

APIResponse is a response generated by the REST API.

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithBlockAuctioneer

func WithBlockAuctioneer(blockAuctioneer blockauctioneer.Service) Parameter

WithBlockAuctioneer sets the block auctioneer.

func WithBlockUnblinder added in v0.3.0

func WithBlockUnblinder(blockUnblinder blockunblinder.Service) Parameter

WithBlockUnblinder sets the block unblinder.

func WithBuilderBidProvider

func WithBuilderBidProvider(provider builderbidprovider.Service) Parameter

WithBuilderBidProvider sets the builder bid provider.

func WithListenAddress

func WithListenAddress(listenAddress string) Parameter

WithListenAddress sets the listen address for this module.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.Service) Parameter

WithMonitor sets the monitor for the module.

func WithServerName

func WithServerName(name string) Parameter

WithServerName sets the server name for this module.

func WithValidatorRegistrar

func WithValidatorRegistrar(validatorRegistrar validatorregistrar.Service) Parameter

WithValidatorRegistrar sets the validator registrar.

type Service

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

Service is the REST daemon service.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new REST daemon service.

func (*Service) ServeHTTP added in v0.3.0

func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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