csr

package
v0.0.0-...-7d539c0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package csr implements helper functionality around the Confluent Schema Registry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeserializer

func NewDeserializer[M proto.Message](config Config) (serde.Deserializer, error)

NewDeserializer creates a new Deserializer for the given Config.

This creates a CSR-based Deserializer if there is a CSR URL, otherwise it creates a single-type Deserializer for type M.

func NewSerializer

func NewSerializer[M proto.Message](config Config) (serde.Serializer, error)

NewSerializer creates a new Serializer for the given Config.

This creates a CSR-based Serializer if there is a CSR URL, otherwise it creates a single-type Serializer for type M.

Types

type Config

type Config struct {
	// The URL of the CSR instance.
	//
	// The absence of this field says to not connect to the CSR.
	URL string
	// The username to use for authentication, if any.
	Username string
	// The password to use for authentication, if any.
	Password string
}

Config is all the configuration needed to connect to a CSR Instance.

Note that the schemaregistry package has its own NewConfig.* functions, which we call. However, we're bringing this down to exactly what we need for this demo.

Jump to

Keyboard shortcuts

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