Documentation ¶
Index ¶
- Variables
- func MigrateClientDealState1To2(oldDs *maptypes.ClientDealState1) (*retrievalmarket.ClientDealState, error)
- func MigrateProviderDealState1To2(oldDs *maptypes.ProviderDealState1) (*retrievalmarket.ProviderDealState, error)
- func NoOpClientDealState0To1(oldDs *maptypes.ClientDealState1) (*maptypes.ClientDealState1, error)
- func NoOpProviderDealState0To1(oldDs *maptypes.ProviderDealState1) (*maptypes.ProviderDealState1, error)
Constants ¶
This section is empty.
Variables ¶
var AskMigrations = versioned.BuilderList{}
AskMigrations are migrations for the providers's retrieval ask
var ClientMigrations = versioned.BuilderList{ versioned.NewVersionedBuilder(NoOpClientDealState0To1, "1"), versioned.NewVersionedBuilder(MigrateClientDealState1To2, "2").OldVersion("1"), }
ClientMigrations are migrations for the client's store of retrieval deals
var ProviderMigrations = versioned.BuilderList{ versioned.NewVersionedBuilder(NoOpProviderDealState0To1, "1"). FilterKeys([]string{"/retrieval-ask", "/retrieval-ask/latest", "/retrieval-ask/1/latest", "/retrieval-ask/versions/current"}), versioned.NewVersionedBuilder(MigrateProviderDealState1To2, "2").OldVersion("1"), }
ProviderMigrations are migrations for the providers's store of retrieval deals
Functions ¶
func MigrateClientDealState1To2 ¶ added in v1.2.0
func MigrateClientDealState1To2(oldDs *maptypes.ClientDealState1) (*retrievalmarket.ClientDealState, error)
MigrateClientDealState1To2 migrates from v1 to v2 of a ClientDealState. The difference is that in v2 the ChannelID is a pointer, because the ChannelID is not set until the data transfer has started, so it should initially be nil.
func MigrateProviderDealState1To2 ¶ added in v1.2.0
func MigrateProviderDealState1To2(oldDs *maptypes.ProviderDealState1) (*retrievalmarket.ProviderDealState, error)
MigrateProviderDealState1To2 migrates from v1 to v2 of a MigrateProviderDealState. The difference is that in v2 the ChannelID is a pointer, because the ChannelID is not set until the data transfer has started, so it should initially be nil.
func NoOpClientDealState0To1 ¶ added in v1.28.0
func NoOpClientDealState0To1(oldDs *maptypes.ClientDealState1) (*maptypes.ClientDealState1, error)
NoOpClientDealState0To1 does nothing (old type removed)
func NoOpProviderDealState0To1 ¶ added in v1.28.0
func NoOpProviderDealState0To1(oldDs *maptypes.ProviderDealState1) (*maptypes.ProviderDealState1, error)
NoOpProviderDealState0To1 does nothing (old type removed)
Types ¶
This section is empty.