migrations

package
v1.28.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2023 License: Apache-2.0, MIT Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AskMigrations = versioned.BuilderList{}

AskMigrations are migrations for the providers's retrieval ask

ClientMigrations are migrations for the client's store of retrieval deals

View Source
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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL