storage

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStorage

type FileStorage struct {
	// contains filtered or unexported fields
}

FileStorage is a registry storage driver that keeps schemas in file storage

func NewFileStorage

func NewFileStorage(broker string, replicas int16, rootDirectory string, topic string, timeout time.Duration) (*FileStorage, error)

NewFileStorage creates a new file storage driver

func (*FileStorage) GetSchema

func (f *FileStorage) GetSchema(ctx context.Context, id uint32) ([]byte, bool, error)

GetSchema will attempt to get a schema by id

func (*FileStorage) RegisterSchema

func (f *FileStorage) RegisterSchema(ctx context.Context, topic string, schema []byte) (uint32, []string, bool, error)

RegisterSchema will register a schema or return the id if it already exists

func (*FileStorage) Run

func (f *FileStorage) Run(ctx context.Context) func() error

Run runs the file storage driver and will fail if the connection to kafka fails

type Schema

type Schema struct {
	Subject string
	ID      uint32
	Schema  []byte
	Deleted bool
}

Schema is a proto schema

type SchemaStorer

type SchemaStorer interface {
	// contains filtered or unexported methods
}

SchemaStorer stores the schema locally

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL