registry

package
v5.16.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRestrictedModeContext added in v5.13.0

func CreateRestrictedModeContext(ctx context.Context) context.Context

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