Skip to content

Commit

Permalink
Merge pull request #10 from GildasCh/master
Browse files Browse the repository at this point in the history
add constructor for a codec registry using the noop schema registry
  • Loading branch information
platelk authored Aug 30, 2018
2 parents eb25228 + abf8f87 commit 735ac66
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions schemaregistry_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ package avro

import "fmt"

// NewNOOPCodecRegistry returns a CodecRegistry that uses the NOOP
// schema registry
func NewNOOPCodecRegistry(subject string) *CodecRegistry {
return &CodecRegistry{
codecByID: make(map[SchemaID]*Codec),
schemaByID: make(map[SchemaID]*Schema),
Registry: NewNOOPClient(),
subject: subject,
}
}

// Retrieved from https://github.com/Landoop/schema-registry

type mockSchemaRegistry struct {
Expand Down

0 comments on commit 735ac66

Please sign in to comment.