AvroBridge

dev.constructive.eo.avro.AvroBridge
See theAvroBridge companion class
object AvroBridge

Constructor for AvroBridge.

Attributes

Companion
class
Source
AvroBridge.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
AvroBridge.type

Members list

Grouped members

Constructors

def between[A, B](using readCodec: AvroCodec[A], writeCodec: AvroCodec[B]): AvroBridge[A, B]

Bridge that reads version A (via readCodec) and writes version B (via writeCodec), under each codec's own schema. .reverse gives the B ⇒ A bridge.

Bridge that reads version A (via readCodec) and writes version B (via writeCodec), under each codec's own schema. .reverse gives the B ⇒ A bridge.

Attributes

Source
AvroBridge.scala

Type members

Types

type BridgedBytes = Either[AvroFailure, Array[Byte]]

The fallible written-bytes result of a migration: Right(bytes) encoded under the writeCodec (version-B) schema, or a Left failure (source didn't decode as the read version A, or the migrated B didn't encode). A single AvroFailure — the bridge has one failure point per direction, so no Chain accumulation.

The fallible written-bytes result of a migration: Right(bytes) encoded under the writeCodec (version-B) schema, or a Left failure (source didn't decode as the read version A, or the migrated B didn't encode). A single AvroFailure — the bridge has one failure point per direction, so no Chain accumulation.

Attributes

Source
AvroBridge.scala