registry

package
v0.0.0-...-07af6e5 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadImplementationByAlias

func LoadImplementationByAlias(ctx context.Context, interfaceType, alias string, data []byte) (proto.Message, error)

func RegisterImplementation

func RegisterImplementation(proto interface{}, loader CustomLoader) error

RegisterImplementation register an implementation of a type of interface loader(CustomLoader) is a private API, its interface is subject to breaking changes

Types

type CustomLoader

type CustomLoader func(data []byte, loader LoadByAlias) (proto.Message, error)

type LoadByAlias

type LoadByAlias interface {
	LoadImplementationByAlias(ctx context.Context, interfaceType, alias string, data []byte) (proto.Message, error)
}

Jump to

Keyboard shortcuts

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