Documentation
¶
Index ¶
- type Registry
- func (r *Registry) Clear()
- func (r *Registry) Close() error
- func (r *Registry) DeleteManifest(ctx context.Context, instanceID string) error
- func (r *Registry) DeleteSchema(ctx context.Context, path string) error
- func (r *Registry) FetchSchema(ctx context.Context, path string) (any, error)
- func (r *Registry) GetManifest(ctx context.Context, instanceID string) (*farp.SchemaManifest, error)
- func (r *Registry) Health(ctx context.Context) error
- func (r *Registry) ListManifests(ctx context.Context, serviceName string) ([]*farp.SchemaManifest, error)
- func (r *Registry) PublishSchema(ctx context.Context, path string, schema any) error
- func (r *Registry) RegisterManifest(ctx context.Context, manifest *farp.SchemaManifest) error
- func (r *Registry) UpdateManifest(ctx context.Context, manifest *farp.SchemaManifest) error
- func (r *Registry) WatchManifests(ctx context.Context, serviceName string, onChange farp.ManifestChangeHandler) error
- func (r *Registry) WatchSchemas(ctx context.Context, path string, onChange farp.SchemaChangeHandler) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is an in-memory implementation of SchemaRegistry Useful for testing and development.
func (*Registry) Clear ¶
func (r *Registry) Clear()
Clear removes all manifests and schemas (useful for testing).
func (*Registry) DeleteManifest ¶
DeleteManifest removes a schema manifest.
func (*Registry) DeleteSchema ¶
DeleteSchema removes a schema from the registry.
func (*Registry) FetchSchema ¶
FetchSchema retrieves a schema from the registry.
func (*Registry) GetManifest ¶
func (r *Registry) GetManifest(ctx context.Context, instanceID string) (*farp.SchemaManifest, error)
GetManifest retrieves a schema manifest by instance ID.
func (*Registry) ListManifests ¶
func (r *Registry) ListManifests(ctx context.Context, serviceName string) ([]*farp.SchemaManifest, error)
ListManifests lists all manifests for a service name.
func (*Registry) PublishSchema ¶
PublishSchema stores a schema in the registry.
func (*Registry) RegisterManifest ¶
RegisterManifest registers a new schema manifest.
func (*Registry) UpdateManifest ¶
UpdateManifest updates an existing schema manifest.
func (*Registry) WatchManifests ¶
func (r *Registry) WatchManifests(ctx context.Context, serviceName string, onChange farp.ManifestChangeHandler) error
WatchManifests watches for manifest changes for a service.
func (*Registry) WatchSchemas ¶
func (r *Registry) WatchSchemas(ctx context.Context, path string, onChange farp.SchemaChangeHandler) error
WatchSchemas watches for schema changes at a specific path.