Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSchema ¶
func CreateSchema( registry SchemaRegistry, topic string, scheme string, key bool, ) (int, bool, error)
CreateSchema creates schema for both key and value of the topic
Types ¶
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
func GetLatestSchemaWithRetry ¶
func GetLatestSchemaWithRetry( registry SchemaRegistry, topic string, key bool, attempts int, ) ( *Schema, error, )
GetLatestSchemaWithRetry gets the schema from registry everytime
func GetSchemaWithRetry ¶
func GetSchemaWithRetry( registry SchemaRegistry, schemaId int, attempts int, ) ( *Schema, error, )
GetSchemaWithRetry gets the schema from registry, it gives cached response
type SchemaRegistry ¶
type SchemaRegistry interface { GetSchema(schemaID int) (*Schema, error) GetLatestSchema(subject string, key bool) (*Schema, error) CreateSchema(subject string, scheme string, schemaType SchemaType, key bool) (*Schema, error) }
SchemaRegistry supports multiple schema registries. An adapter interface to support various schema registries out there! at present it supports only one(cSchemaRegistry)
func NewRegistry ¶
func NewRegistry(url string) SchemaRegistry
Click to show internal directories.
Click to hide internal directories.