Versions in this module Expand all Collapse all v0 v0.9.2 May 24, 2021 Changes in this version + var ErrConnectionTimeout = EndpointTimeoutError + var ErrDialRetryMax = errors.New("dialed maximum retries") + var ErrNoConnection = fmt.Errorf("endpoint is not connected") + var ErrReadTimeout = fmt.Errorf("endpoint read timed out") + var ErrUnexpectedResponse = fmt.Errorf("received unexpected response") + var ErrWriteTimeout = fmt.Errorf("endpoint write timed out") + func GetFreeLocalhostAddrPort() string + func IsConnTimeout(err error) bool + func NewTCPListener(ln net.Listener, secretConnKey ed25519.PrivKeyEd25519) *tcpListener + func NewUnixListener(ln net.Listener) *unixListener + func RegisterRemoteSignerMsg(cdc *amino.Codec) + type EndpointTimeoutError struct + func (e EndpointTimeoutError) Error() string + func (e EndpointTimeoutError) Temporary() bool + func (e EndpointTimeoutError) Timeout() bool + type FilePV struct + Key FilePVKey + LastSignState FilePVLastSignState + func GenFilePV(keyFilePath, stateFilePath string) *FilePV + func LoadFilePV(keyFilePath, stateFilePath string) *FilePV + func LoadFilePVEmptyState(keyFilePath, stateFilePath string) *FilePV + func LoadOrGenFilePV(keyFilePath, stateFilePath string) *FilePV + func (pv *FilePV) GetAddress() types.Address + func (pv *FilePV) GetPubKey() crypto.PubKey + func (pv *FilePV) Reset() + func (pv *FilePV) Save() + func (pv *FilePV) SignProposal(chainID string, proposal *types.Proposal) error + func (pv *FilePV) SignVote(chainID string, vote *types.Vote) error + func (pv *FilePV) String() string + type FilePVKey struct + Address types.Address + PrivKey crypto.PrivKey + PubKey crypto.PubKey + func (pvKey FilePVKey) Save() + type FilePVLastSignState struct + Height int64 + Round int + SignBytes cmn.HexBytes + Signature []byte + Step int8 + func (lss *FilePVLastSignState) CheckHRS(height int64, round int, step int8) (bool, error) + func (lss *FilePVLastSignState) Save() + type OldFilePV struct + Address types.Address + LastHeight int64 + LastRound int + LastSignBytes cmn.HexBytes + LastSignature []byte + LastStep int8 + PrivKey crypto.PrivKey + PubKey crypto.PubKey + func LoadOldFilePV(filePath string) (*OldFilePV, error) + func (oldFilePV *OldFilePV) Upgrade(keyFilePath, stateFilePath string) *FilePV + type PingRequest struct + type PingResponse struct + type PubKeyRequest struct + type PubKeyResponse struct + Error *RemoteSignerError + PubKey crypto.PubKey + type RemoteSignerError struct + Code int + Description string + func (e *RemoteSignerError) Error() string + type SignProposalRequest struct + Proposal *types.Proposal + type SignVoteRequest struct + Vote *types.Vote + type SignedProposalResponse struct + Error *RemoteSignerError + Proposal *types.Proposal + type SignedVoteResponse struct + Error *RemoteSignerError + Vote *types.Vote + type SignerClient struct + func NewSignerClient(endpoint *SignerListenerEndpoint) (*SignerClient, error) + func (sc *SignerClient) Close() error + func (sc *SignerClient) GetPubKey() crypto.PubKey + func (sc *SignerClient) IsConnected() bool + func (sc *SignerClient) Ping() error + func (sc *SignerClient) SignProposal(chainID string, proposal *types.Proposal) error + func (sc *SignerClient) SignVote(chainID string, vote *types.Vote) error + func (sc *SignerClient) WaitForConnection(maxWait time.Duration) error + type SignerDialerEndpoint struct + func NewSignerDialerEndpoint(logger log.Logger, dialer SocketDialer) *SignerDialerEndpoint + func (se *SignerDialerEndpoint) Close() error + func (se *SignerDialerEndpoint) DropConnection() + func (se *SignerDialerEndpoint) GetAvailableConnection(connectionAvailableCh chan net.Conn) bool + func (se *SignerDialerEndpoint) IsConnected() bool + func (se *SignerDialerEndpoint) ReadMessage() (msg SignerMessage, err error) + func (se *SignerDialerEndpoint) SetConnection(newConnection net.Conn) + func (se *SignerDialerEndpoint) WaitConnection(connectionAvailableCh chan net.Conn, maxWait time.Duration) error + func (se *SignerDialerEndpoint) WriteMessage(msg SignerMessage) (err error) + type SignerListenerEndpoint struct + func NewSignerListener(listenAddr string, logger log.Logger) (*SignerListenerEndpoint, error) + func NewSignerListenerEndpoint(logger log.Logger, listener net.Listener) *SignerListenerEndpoint + func (se *SignerListenerEndpoint) Close() error + func (se *SignerListenerEndpoint) DropConnection() + func (se *SignerListenerEndpoint) GetAvailableConnection(connectionAvailableCh chan net.Conn) bool + func (se *SignerListenerEndpoint) IsConnected() bool + func (se *SignerListenerEndpoint) ReadMessage() (msg SignerMessage, err error) + func (se *SignerListenerEndpoint) SetConnection(newConnection net.Conn) + func (se *SignerListenerEndpoint) WaitConnection(connectionAvailableCh chan net.Conn, maxWait time.Duration) error + func (se *SignerListenerEndpoint) WriteMessage(msg SignerMessage) (err error) + func (sl *SignerListenerEndpoint) OnStart() error + func (sl *SignerListenerEndpoint) OnStop() + func (sl *SignerListenerEndpoint) SendRequest(request SignerMessage) (SignerMessage, error) + func (sl *SignerListenerEndpoint) WaitForConnection(maxWait time.Duration) error + type SignerMessage interface + func DefaultValidationRequestHandler(privVal types.PrivValidator, req SignerMessage, chainID string) (SignerMessage, error) + type SignerServer struct + func NewSignerServer(endpoint *SignerDialerEndpoint, chainID string, privVal types.PrivValidator) *SignerServer + func (ss *SignerServer) OnStart() error + func (ss *SignerServer) OnStop() + func (ss *SignerServer) SetRequestHandler(validationRequestHandler ValidationRequestHandlerFunc) + type SignerServiceEndpointOption func(*SignerDialerEndpoint) + func SignerDialerEndpointConnRetries(retries int) SignerServiceEndpointOption + func SignerDialerEndpointTimeoutReadWrite(timeout time.Duration) SignerServiceEndpointOption + type SignerValidatorEndpointOption func(*SignerListenerEndpoint) + type SocketDialer func() (net.Conn, error) + func DialTCPFn(addr string, timeoutReadWrite time.Duration, privKey ed25519.PrivKeyEd25519) SocketDialer + func DialUnixFn(addr string) SocketDialer + type TCPListenerOption func(*tcpListener) + func TCPListenerTimeoutAccept(timeout time.Duration) TCPListenerOption + func TCPListenerTimeoutReadWrite(timeout time.Duration) TCPListenerOption + type UnixListenerOption func(*unixListener) + func UnixListenerTimeoutAccept(timeout time.Duration) UnixListenerOption + func UnixListenerTimeoutReadWrite(timeout time.Duration) UnixListenerOption + type ValidationRequestHandlerFunc func(privVal types.PrivValidator, requestMessage SignerMessage, chainID string) (SignerMessage, error)