Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var VerObj = NewVerifier(&Options{Often: 30})
Functions ¶
This section is empty.
Types ¶
type Order ¶
type Order struct { PeerID string `json:"peer_id"` Port int `json:"port"` OrderID string `json:"order_id"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` Healthy *Healthy `json:"healthy"` }
func (*Order) CheckHealthy ¶
type OrderMysql ¶
type OrderMysql struct { ID uint `gorm:"primarykey"` CreatedAt int64 `gorm:"autoCreateTime"` UpdatedAt int64 `gorm:"autoUpdateTime"` UserUUID string `json:"user_uuid" gorm:"user_uuid"` Name string `json:"name"` PeerID string `json:"peer_id"` UUID string `json:"uuid" gorm:"column:uuid"` Port int `json:"port"` Duration uint `json:"duration"` // 使用时间:小时 Price uint `json:"price"` // 金额 ResourceCid string `json:"resource_cid"` ServerCid string `json:"server_cid"` ClientCid string `json:"client_cid"` Status uint `json:"status"` // 0:待支付,1:已支付,待回调,2:已完成 NodeIP string `json:"node_ip"` }
func (OrderMysql) TableName ¶
func (OrderMysql) TableName() string
type Record ¶
type Record struct { Total uint64 `json:"total"` Success uint64 `json:"success"` Fail uint64 `json:"fail"` }
func (*Record) AddSuccess ¶
func (*Record) GetSuccess ¶
type Verifier ¶
type Verifier struct { Provider []*Provider Record map[string]*Record Health map[string]*Record sync.RWMutex // contains filtered or unexported fields }
func NewVerifier ¶
func (*Verifier) ProviderHealth ¶
func (*Verifier) Statistics ¶
func (v *Verifier) Statistics()
func (*Verifier) SyncProviderAndOrder ¶
func (v *Verifier) SyncProviderAndOrder()
Click to show internal directories.
Click to hide internal directories.