Documentation ¶
Index ¶
- Variables
- type Block
- type BlockSyncer
- type MarginAccount
- type Syncer
- func (s *Syncer) GetMarkPriceBasedOnBlockNumber(blockNumber int64, poolAddr string, perpetualIndex int) (*decimal.Decimal, error)
- func (s *Syncer) GetPoolAddrIndexUserID(marginAccountID string) (poolAddr, userId string, perpetualIndex int, err error)
- func (s *Syncer) GetUsersBasedOnBlockNumber(blockNumber int64) ([]User, error)
- func (s *Syncer) Init()
- func (s *Syncer) Run() error
- func (s *Syncer) TimestampToBlockNumber(startTime int64) (int64, error)
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var EMPTY_SCHEDULE = errors.New("empty schedule")
View Source
var NOT_IN_EPOCH = errors.New("not in epoch period")
View Source
var Transport = &http.Transport{ DialContext: (&net.Dialer{ Timeout: 500 * time.Millisecond, }).DialContext, TLSHandshakeTimeout: 1000 * time.Millisecond, MaxIdleConns: 100, IdleConnTimeout: 30 * time.Second, }
Functions ¶
This section is empty.
Types ¶
type BlockSyncer ¶ added in v0.0.2
type BlockSyncer struct {
// contains filtered or unexported fields
}
func NewBlockSyncer ¶ added in v0.0.2
func (*BlockSyncer) Init ¶ added in v0.0.2
func (s *BlockSyncer) Init()
func (*BlockSyncer) Run ¶ added in v0.0.2
func (s *BlockSyncer) Run() error
type MarginAccount ¶ added in v0.0.2
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
func (*Syncer) GetMarkPriceBasedOnBlockNumber ¶ added in v0.0.2
func (*Syncer) GetPoolAddrIndexUserID ¶ added in v0.0.2
func (*Syncer) GetUsersBasedOnBlockNumber ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.