Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) ClaimFee(chain string) (*ResClaimFee, error)
- func (c *Client) Close() error
- func (c *Client) GetBlock(chain string) ([]*ResGetBlock, error)
- func (c *Client) GetFee(chain string, network string, isReponse bool) (*ResGetFee, error)
- func (c *Client) GetMessageList(chain string, pagination *store.Pagination) (*ResMessageList, error)
- func (c *Client) MessageRemove(chain string, sn *big.Int) (*ResMessageRemove, error)
- func (c *Client) PruneDB() (*ResPruneDB, error)
- func (c *Client) RelayMessage(chain string, height uint64, sn *big.Int) (*ResRelayMessage, error)
- func (c *Client) RevertMessage(chain string, sn uint64) (*ResRevertMessage, error)
- func (c *Client) SetFee(chain, network string, msgFee, resFee *big.Int) (*ResSetFee, error)
- type ErrResponse
- type Event
- type Message
- type ReqClaimFee
- type ReqGetBlock
- type ReqGetFee
- type ReqMessageList
- type ReqMessageRemove
- type ReqPruneDB
- type ReqRelayMessage
- type ReqRevertMessage
- type ReqSetFee
- type ResClaimFee
- type ResGetBlock
- type ResGetFee
- type ResMessageList
- type ResMessageRemove
- type ResPruneDB
- type ResRelayMessage
- type ResRevertMessage
- type ResSetFee
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownEvent = fmt.Errorf("unknown event") ErrSocketClosed = fmt.Errorf("socket closed") ErrInvalidResponse = func(err error) error { return fmt.Errorf("invalid response: %v", err) } ErrUnknown = fmt.Errorf("unknown error") )
View Source
var (
SocketPath = path.Join(os.TempDir(), "relayer.sock")
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ClaimFee ¶ added in v1.1.0
func (c *Client) ClaimFee(chain string) (*ResClaimFee, error)
ClaimFee sends ClaimFee event to socket
func (*Client) GetBlock ¶
func (c *Client) GetBlock(chain string) ([]*ResGetBlock, error)
GetBlock sends GetBlock event to socket
func (*Client) GetMessageList ¶
func (c *Client) GetMessageList(chain string, pagination *store.Pagination) (*ResMessageList, error)
GetMessageList sends GetMessageList event to socket
func (*Client) MessageRemove ¶
MessageRemove sends MessageRemove event to socket
func (*Client) PruneDB ¶
func (c *Client) PruneDB() (*ResPruneDB, error)
PruneDB sends PruneDB event to socket
func (*Client) RelayMessage ¶
RelayMessage sends RelayMessage event to socket
func (*Client) RevertMessage ¶
func (c *Client) RevertMessage(chain string, sn uint64) (*ResRevertMessage, error)
RevertMessage sends RevertMessage event to socket
type ErrResponse ¶
type ErrResponse struct {
Error string
}
type Event ¶
type Event string
const ( EventGetBlock Event = "GetBlock" EventGetMessageList Event = "GetMessageList" EventRelayMessage Event = "RelayMessage" EventMessageRemove Event = "MessageRemove" EventPruneDB Event = "PruneDB" EventRevertMessage Event = "RevertMessage" EventError Event = "Error" EventGetFee Event = "GetFee" EventSetFee Event = "SetFee" EventClaimFee Event = "ClaimFee" )
type ReqClaimFee ¶ added in v1.1.0
type ReqClaimFee struct {
Chain string
}
ReqClaimFee sends ClaimFee event to socket
type ReqGetBlock ¶
type ReqMessageList ¶
type ReqMessageList struct { Chain string Pagination *store.Pagination }
type ReqMessageRemove ¶
type ReqPruneDB ¶
type ReqPruneDB struct {
Chain string
}
type ReqRevertMessage ¶
type ResClaimFee ¶ added in v1.1.0
type ResClaimFee struct {
Status string
}
ResClaimFee sends ClaimFee event to socket
type ResGetBlock ¶
type ResMessageList ¶
type ResMessageList struct { Messages []*types.RouteMessage Total int }
type ResMessageRemove ¶
type ResPruneDB ¶
type ResPruneDB struct {
Status string
}
type ResRelayMessage ¶
type ResRelayMessage struct {
*types.RouteMessage
}
type ResRevertMessage ¶
type ResRevertMessage struct {
Sn uint64
}
type ResSetFee ¶ added in v1.1.0
type ResSetFee struct {
Status string
}
ResSetFee sends SetFee event to socket
Click to show internal directories.
Click to hide internal directories.