Documentation
¶
Index ¶
- Variables
- type CachedConfluentSchemaRegistry
- type ConfluentSchemaRegistry
- type InMemoryCache
- func (c *InMemoryCache) LookupIdBySchema(subject string, schema avro.Schema) uint32
- func (c *InMemoryCache) LookupSchemaByID(schemaID uint32) avro.Schema
- func (c *InMemoryCache) StoreIdBySchema(subject string, schema avro.Schema, schemaID uint32) uint32
- func (c *InMemoryCache) StoreSchemaByID(schemaID uint32, schema avro.Schema) avro.Schema
- type Messaging
- func (m *Messaging) Decode(data []byte, obj interface{}) error
- func (m *Messaging) DecodeByLocalSchema(data []byte, obj interface{}, schemaName string, namespace string) error
- func (m *Messaging) Encode(obj interface{}, subject string, schemaName string, namespace string) ([]byte, error)
- func (m *Messaging) EncodeByLocalSchema(obj interface{}, schemaName string, namespace string, schemaID uint32) ([]byte, error)
- func (m *Messaging) GetRecordSchema(data []byte) (*avro.RecordSchema, error)
- func (m *Messaging) GetSchema(data []byte) (avro.Schema, error)
- func (m *Messaging) RegisterSchema(subject string, schemaName string, namespace string) (uint32, avro.Schema, error)
- type SchemaRegistry
- type SchemaStore
Constants ¶
This section is empty.
Variables ¶
View Source
var HTTPClient httpClient
View Source
var Logger *log.Logger
Functions ¶
This section is empty.
Types ¶
type CachedConfluentSchemaRegistry ¶
type CachedConfluentSchemaRegistry struct {
Upstream *ConfluentSchemaRegistry
Cache *InMemoryCache
}
func (*CachedConfluentSchemaRegistry) FetchSchema ¶
func (r *CachedConfluentSchemaRegistry) FetchSchema(schemaID uint32) (avro.Schema, error)
type ConfluentSchemaRegistry ¶
type ConfluentSchemaRegistry struct {
RegistryURL string
}
func (*ConfluentSchemaRegistry) FetchSchema ¶
func (r *ConfluentSchemaRegistry) FetchSchema(schemaID uint32) (avro.Schema, error)
type InMemoryCache ¶
type InMemoryCache struct {
SchemasByID map[uint32]avro.Schema
IdsBySchema map[string]uint32
SchemasBySubjectVersion map[string]avro.Schema
}
func NewInMemoryCache ¶
func NewInMemoryCache() *InMemoryCache
func (*InMemoryCache) LookupIdBySchema ¶
func (c *InMemoryCache) LookupIdBySchema(subject string, schema avro.Schema) uint32
func (*InMemoryCache) LookupSchemaByID ¶
func (c *InMemoryCache) LookupSchemaByID(schemaID uint32) avro.Schema
func (*InMemoryCache) StoreIdBySchema ¶
func (*InMemoryCache) StoreSchemaByID ¶
type Messaging ¶
type Messaging struct {
sync.Mutex
NameSpace string
SchemaStore *SchemaStore
Registry SchemaRegistry
SchemasByID map[uint32]avro.Schema
}
func (*Messaging) DecodeByLocalSchema ¶
func (*Messaging) EncodeByLocalSchema ¶
func (*Messaging) GetRecordSchema ¶
func (m *Messaging) GetRecordSchema(data []byte) (*avro.RecordSchema, error)
type SchemaRegistry ¶
type SchemaStore ¶
func NewSchemaStore ¶
func NewSchemaStore(path string) *SchemaStore
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mock_avroturf is a generated GoMock package.
|
Package mock_avroturf is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.