Documentation ¶
Index ¶
- func Rabin(buf []byte) uint64
- type SchemaCache
- func (c *SchemaCache) GetByID(id int, miss func() (sr.Schema, error)) (sr.Schema, error)
- func (c *SchemaCache) GetBySubjectText(subject string, text string, miss func() (sr.SubjectSchema, error)) (sr.SubjectSchema, error)
- func (c *SchemaCache) GetBySubjectVersion(subject string, version int, miss func() (sr.SubjectSchema, error)) (sr.SubjectSchema, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Rabin ¶
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) 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)
Click to show internal directories.
Click to hide internal directories.