Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DVS ¶
type DVS[V any] struct { // contains filtered or unexported fields }
DVS provides versioning support for the mus-stream-go serializer.
func (DVS[V]) Marshal ¶ added in v0.4.0
Marshal migrates v to the version specified by dtm and then writes dtm + resulting v version encoding.
Returns the number of written bytes and one of the ErrUnknownDTM, ErrWrongTypeVersion or Writer errors.
type MigrationVersion ¶
type MigrationVersion[V any] interface { MigrateCurrentAndMarshal(v V, w muss.Writer) (n int, err error) UnmarshalAndMigrateOld(r muss.Reader) (v V, n int, err error) }
MigrationVersion represents a generic type version for Registry that can be migrated.
It contains methods to support all mus-stream-dvs-go functionality.
type Version ¶
type Version[T any, V any] struct { DTS dts.DTS[T] MigrateOld com.MigrateOld[T, V] MigrateCurrent com.MigrateCurrent[V, T] }
Version is an implementation of the MigrationVersion interface.
func (Version[T, V]) MigrateCurrentAndMarshal ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.