Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HermesClient ¶
type HermesClient interface {
GetConsumerData(chainID int64, id string, cacheDuration time.Duration) (pingpong.HermesUserInfo, error)
}
HermesClient responses for receiving info from Hermes
type HermesMigrator ¶
type HermesMigrator struct {
// contains filtered or unexported fields
}
HermesMigrator migrate identity from old hermes to new. It opens a new channel for new Hermes and sends all MYST to a new payment channel.
func NewHermesMigrator ¶
func NewHermesMigrator( transactor *registry.Transactor, addressProvider registry.AddressProvider, hermesURLGetter *pingpong.HermesURLGetter, hermesCallerFactory pingpong.HermesCallerFactory, hps pingpong.HermesPromiseSettler, registry registry.IdentityRegistry, cbt *pingpong.ConsumerBalanceTracker, st *Storage, bc blockchain, ) *HermesMigrator
NewHermesMigrator create new HermesMigrator
func (*HermesMigrator) IsMigrationRequired ¶
func (m *HermesMigrator) IsMigrationRequired(id string) (bool, error)
IsMigrationRequired check whether migration required
func (*HermesMigrator) Start ¶
func (m *HermesMigrator) Start(id string) error
Start begins migration from old hermes to new
func (*HermesMigrator) Subscribe ¶
func (m *HermesMigrator) Subscribe(eb eventbus.Subscriber) error
Subscribe for EventBus events
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage keeps track of migration progress
func NewStorage ¶
func NewStorage(db respository, ap registry.AddressProvider) *Storage
NewStorage builds and returns a new storage object.
func (*Storage) MarkAsMigrated ¶
MarkAsMigrated set migration flag do not try to migrate again
Click to show internal directories.
Click to hide internal directories.