Documentation ¶
Index ¶
- func GenerateCert(validFor time.Duration, hosts []string) (cert, key []byte, err error)
- type BuilderConfigHub
- type BuilderInfo
- type Config
- type JSONRPCError
- type JSONRPCRequest
- type JSONRPCResponse
- type MockBuilderConfigHub
- type Proxy
- func (prx *Proxy) GenerateAndPublish() error
- func (prx *Proxy) HandleRequest(req JSONRPCRequest, signer common.Address, publicEndpoint bool) *JSONRPCError
- func (prx *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (prx *Proxy) ServeProxyRequest(w http.ResponseWriter, r *http.Request, publicEndpoint bool)
- func (prx *Proxy) StartServersInBackground() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuilderConfigHub ¶
type BuilderConfigHub interface { PublishConfig(info BuilderInfo) error GetBuilders() ([]BuilderInfo, error) }
type BuilderInfo ¶
type JSONRPCError ¶
type JSONRPCRequest ¶
type JSONRPCRequest struct { JSONRPC string `json:"jsonrpc"` ID any `json:"id"` Method string `json:"method"` Params []json.RawMessage `json:"params"` }
type JSONRPCResponse ¶
type JSONRPCResponse struct { JSONRPC string `json:"jsonrpc"` ID any `json:"id"` Result *json.RawMessage `json:"result,omitempty"` Error *JSONRPCError `json:"error,omitempty"` }
type MockBuilderConfigHub ¶
type MockBuilderConfigHub struct{}
func (MockBuilderConfigHub) GetBuilders ¶
func (m MockBuilderConfigHub) GetBuilders() ([]BuilderInfo, error)
func (MockBuilderConfigHub) PublishConfig ¶
func (m MockBuilderConfigHub) PublishConfig(info BuilderInfo) error
type Proxy ¶
type Proxy struct { Config Config // contains filtered or unexported fields }
func (*Proxy) GenerateAndPublish ¶
func (*Proxy) HandleRequest ¶
func (prx *Proxy) HandleRequest(req JSONRPCRequest, signer common.Address, publicEndpoint bool) *JSONRPCError
func (*Proxy) ServeProxyRequest ¶
func (*Proxy) StartServersInBackground ¶
Click to show internal directories.
Click to hide internal directories.