Documentation
¶
Index ¶
- Variables
- type L2KeystoneLatestResponse
- type L2KeystoneValidityResponse
- type OpGethMockHandler
- func (f *OpGethMockHandler) CloseConnections() error
- func (f *OpGethMockHandler) Running() bool
- func (f *OpGethMockHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (f *OpGethMockHandler) Shutdown()
- func (f *OpGethMockHandler) Start()
- func (f *OpGethMockHandler) Stop()
- func (f *OpGethMockHandler) URL() string
- type TBCMockHandler
- func (f *TBCMockHandler) CloseConnections() error
- func (f *TBCMockHandler) GetKeystones() map[chainhash.Hash]*hemi.L2KeystoneAbrev
- func (f *TBCMockHandler) Running() bool
- func (f *TBCMockHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (f *TBCMockHandler) Shutdown()
- func (f *TBCMockHandler) Start()
- func (f *TBCMockHandler) Stop()
- func (f *TBCMockHandler) URL() string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultNtfnDuration = 250 * time.Millisecond
)
Functions ¶
This section is empty.
Types ¶
type L2KeystoneLatestResponse ¶
type L2KeystoneLatestResponse struct {
L2Keystones []hemi.L2Keystone `json:"keystones"`
Error *protocol.Error `json:"error,omitempty"`
}
type L2KeystoneValidityResponse ¶
type L2KeystoneValidityResponse struct {
L2Keystones []hemi.L2Keystone `json:"keystones"`
Error *protocol.Error `json:"error,omitempty"`
}
type OpGethMockHandler ¶
type OpGethMockHandler struct {
// contains filtered or unexported fields
}
func NewMockOpGeth ¶
func NewMockOpGeth(pctx context.Context, errCh chan error, msgCh chan string, keystones []hemi.L2Keystone) *OpGethMockHandler
func (*OpGethMockHandler) CloseConnections ¶
func (f *OpGethMockHandler) CloseConnections() error
Force close all websocket connection to the test server
func (*OpGethMockHandler) ServeHTTP ¶
func (f *OpGethMockHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*OpGethMockHandler) Shutdown ¶
func (f *OpGethMockHandler) Shutdown()
Fully shutdown the test server
func (*OpGethMockHandler) Start ¶
func (f *OpGethMockHandler) Start()
Allow the test server to accept incoming websocket connection
type TBCMockHandler ¶
type TBCMockHandler struct {
// contains filtered or unexported fields
}
func NewMockTBC ¶
func NewMockTBC(pctx context.Context, errCh chan error, msgCh chan string, keystones map[chainhash.Hash]*hemi.L2KeystoneAbrev, btcTip, utxoNum uint) *TBCMockHandler
func (*TBCMockHandler) CloseConnections ¶
func (f *TBCMockHandler) CloseConnections() error
Force close all websocket connection to the test server
func (*TBCMockHandler) GetKeystones ¶
func (f *TBCMockHandler) GetKeystones() map[chainhash.Hash]*hemi.L2KeystoneAbrev
func (*TBCMockHandler) ServeHTTP ¶
func (f *TBCMockHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*TBCMockHandler) Shutdown ¶
func (f *TBCMockHandler) Shutdown()
Fully shutdown the test server
func (*TBCMockHandler) Start ¶
func (f *TBCMockHandler) Start()
Allow the test server to accept incoming websocket connection
Click to show internal directories.
Click to hide internal directories.