Versions in this module Expand all Collapse all v0 v0.0.2 May 6, 2020 Changes in this version + func NewAvroConsumer(kafkaServers []string, schemaRegistryServers []string, topic string, ...) (*avroConsumer, error) + type AvroEncoder struct + Content []byte + SchemaID int + func (a *AvroEncoder) Encode() ([]byte, error) + func (a *AvroEncoder) Length() int + type AvroProducer struct + func NewAvroProducer(kafkaServers []string, schemaRegistryServers []string) (*AvroProducer, error) + func (ac *AvroProducer) Close() + func (ap *AvroProducer) Add(topic string, schema string, key []byte, value []byte) error + func (ap *AvroProducer) GetSchemaId(topic string, avroCodec *goavro.Codec) (int, error) + type CachedSchemaRegistryClient struct + SchemaRegistryClient *SchemaRegistryClient + func NewCachedSchemaRegistryClient(connect []string) *CachedSchemaRegistryClient + func NewCachedSchemaRegistryClientWithRetries(connect []string, retries int) *CachedSchemaRegistryClient + func (client *CachedSchemaRegistryClient) CreateSubject(subject string, codec *goavro.Codec) (int, error) + func (client *CachedSchemaRegistryClient) DeleteSubject(subject string) error + func (client *CachedSchemaRegistryClient) DeleteVersion(subject string, version int) error + func (client *CachedSchemaRegistryClient) GetLatestSchema(subject string) (*goavro.Codec, error) + func (client *CachedSchemaRegistryClient) GetSchema(id int) (*goavro.Codec, error) + func (client *CachedSchemaRegistryClient) GetSchemaByVersion(subject string, version int) (*goavro.Codec, error) + func (client *CachedSchemaRegistryClient) GetSubjects() ([]string, error) + func (client *CachedSchemaRegistryClient) GetVersions(subject string) ([]int, error) + func (client *CachedSchemaRegistryClient) IsSchemaRegistered(subject string, codec *goavro.Codec) (int, error) + type ConsumerCallbacks struct + OnDataReceived func(msg Message) + OnError func(err error) + OnNotification func(notification *cluster.Notification) + type Error struct + ErrorCode int + Message string + func (e *Error) Error() string + type Message struct + Key string + Offset int64 + Partition int32 + SchemaId int + Topic string + Value string + type SchemaRegistryClient struct + SchemaRegistryConnect []string + func NewSchemaRegistryClient(connect []string) *SchemaRegistryClient + func NewSchemaRegistryClientWithRetries(connect []string, retries int) *SchemaRegistryClient + func (client *SchemaRegistryClient) CreateSubject(subject string, codec *goavro.Codec) (int, error) + func (client *SchemaRegistryClient) DeleteSubject(subject string) error + func (client *SchemaRegistryClient) DeleteVersion(subject string, version int) error + func (client *SchemaRegistryClient) GetLatestSchema(subject string) (*goavro.Codec, error) + func (client *SchemaRegistryClient) GetSchema(id int) (*goavro.Codec, error) + func (client *SchemaRegistryClient) GetSchemaByVersion(subject string, version int) (*goavro.Codec, error) + func (client *SchemaRegistryClient) GetSubjects() ([]string, error) + func (client *SchemaRegistryClient) GetVersions(subject string) ([]int, error) + func (client *SchemaRegistryClient) IsSchemaRegistered(subject string, codec *goavro.Codec) (int, error) + type SchemaRegistryClientInterface interface + CreateSubject func(string, *goavro.Codec) (int, error) + DeleteSubject func(string) error + DeleteVersion func(string, int) error + GetLatestSchema func(string) (*goavro.Codec, error) + GetSchema func(int) (*goavro.Codec, error) + GetSchemaByVersion func(string, int) (*goavro.Codec, error) + GetSubjects func() ([]string, error) + GetVersions func(string) ([]int, error) + IsSchemaRegistered func(string, *goavro.Codec) (int, error)