internal

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Rabin

func Rabin(buf []byte) uint64

Rabin creates a Rabin fingerprint according to the spec: https://avro.apache.org/docs/1.8.2/spec.html#schema_fingerprints

Types

type SchemaCache

type SchemaCache struct {
	// contains filtered or unexported fields
}

SchemaCache caches schemas by ID, their subject/fingerprint and subject/version. Fingerprints are calculated using the Rabin algorithm.

func (*SchemaCache) GetByID

func (c *SchemaCache) GetByID(id int, miss func() (sr.Schema, error)) (sr.Schema, error)

func (*SchemaCache) GetBySubjectText

func (c *SchemaCache) GetBySubjectText(subject string, text string, miss func() (sr.SubjectSchema, error)) (sr.SubjectSchema, error)

func (*SchemaCache) GetBySubjectVersion

func (c *SchemaCache) GetBySubjectVersion(subject string, version int, miss func() (sr.SubjectSchema, error)) (sr.SubjectSchema, error)

Jump to

Keyboard shortcuts

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