grpc

package
v0.1.309 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReflectTypeIServiceEndpointRegistration = di.GetInterfaceReflectType((*IServiceEndpointRegistration)(nil))

ReflectTypeIServiceEndpointRegistration used when your service claims to implement IServiceEndpointRegistration

Functions

func AddScopedIServiceEndpointRegistration

func AddScopedIServiceEndpointRegistration(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)

AddScopedIServiceEndpointRegistration adds a type that implements IServiceEndpointRegistration

func AddScopedIServiceEndpointRegistrationByFunc

func AddScopedIServiceEndpointRegistrationByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)

AddScopedIServiceEndpointRegistrationByFunc adds a type by a custom func

func AddScopedIServiceEndpointRegistrationByFuncWithMetadata

func AddScopedIServiceEndpointRegistrationByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddScopedIServiceEndpointRegistrationByFuncWithMetadata adds a type by a custom func

func AddScopedIServiceEndpointRegistrationWithMetadata

func AddScopedIServiceEndpointRegistrationWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddScopedIServiceEndpointRegistrationWithMetadata adds a type that implements IServiceEndpointRegistration

func AddSingletonIServiceEndpointRegistration

func AddSingletonIServiceEndpointRegistration(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)

AddSingletonIServiceEndpointRegistration adds a type that implements IServiceEndpointRegistration

func AddSingletonIServiceEndpointRegistrationByFunc

func AddSingletonIServiceEndpointRegistrationByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)

AddSingletonIServiceEndpointRegistrationByFunc adds a type by a custom func

func AddSingletonIServiceEndpointRegistrationByFuncWithMetadata

func AddSingletonIServiceEndpointRegistrationByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIServiceEndpointRegistrationByFuncWithMetadata adds a type by a custom func

func AddSingletonIServiceEndpointRegistrationByObj

func AddSingletonIServiceEndpointRegistrationByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)

AddSingletonIServiceEndpointRegistrationByObj adds a prebuilt obj

func AddSingletonIServiceEndpointRegistrationByObjWithMetadata

func AddSingletonIServiceEndpointRegistrationByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIServiceEndpointRegistrationByObjWithMetadata adds a prebuilt obj

func AddSingletonIServiceEndpointRegistrationWithMetadata

func AddSingletonIServiceEndpointRegistrationWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIServiceEndpointRegistrationWithMetadata adds a type that implements IServiceEndpointRegistration

func AddTransientIServiceEndpointRegistration

func AddTransientIServiceEndpointRegistration(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)

AddTransientIServiceEndpointRegistration adds a type that implements IServiceEndpointRegistration

func AddTransientIServiceEndpointRegistrationByFunc

func AddTransientIServiceEndpointRegistrationByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)

AddTransientIServiceEndpointRegistrationByFunc adds a type by a custom func

func AddTransientIServiceEndpointRegistrationByFuncWithMetadata

func AddTransientIServiceEndpointRegistrationByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddTransientIServiceEndpointRegistrationByFuncWithMetadata adds a type by a custom func

func AddTransientIServiceEndpointRegistrationWithMetadata

func AddTransientIServiceEndpointRegistrationWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddTransientIServiceEndpointRegistrationWithMetadata adds a type that implements IServiceEndpointRegistration

func GetIServiceEndpointRegistrationDefinition

func GetIServiceEndpointRegistrationDefinition(ctn di.Container) *di.Def

GetIServiceEndpointRegistrationDefinition returns that last definition registered that this container can provide

func GetIServiceEndpointRegistrationDefinitions

func GetIServiceEndpointRegistrationDefinitions(ctn di.Container) []*di.Def

GetIServiceEndpointRegistrationDefinitions returns all definitions that this container can provide

func RemoveAllIServiceEndpointRegistration

func RemoveAllIServiceEndpointRegistration(builder *di.Builder)

RemoveAllIServiceEndpointRegistration removes all IServiceEndpointRegistration from the DI

Types

type IServiceEndpointRegistration

type IServiceEndpointRegistration interface {
	GetName() string
	GetNewClient(cc grpc.ClientConnInterface) interface{}
	RegisterEndpoint(server *grpc.Server) interface{}
}

IServiceEndpointRegistration interface

func GetIServiceEndpointRegistrationFromContainer

func GetIServiceEndpointRegistrationFromContainer(ctn di.Container) IServiceEndpointRegistration

GetIServiceEndpointRegistrationFromContainer alternative to SafeGetIServiceEndpointRegistrationFromContainer but panics of object is not present

func GetManyIServiceEndpointRegistrationFromContainer

func GetManyIServiceEndpointRegistrationFromContainer(ctn di.Container) []IServiceEndpointRegistration

GetManyIServiceEndpointRegistrationFromContainer alternative to SafeGetManyIServiceEndpointRegistrationFromContainer but panics of object is not present

func SafeGetIServiceEndpointRegistrationFromContainer

func SafeGetIServiceEndpointRegistrationFromContainer(ctn di.Container) (IServiceEndpointRegistration, error)

SafeGetIServiceEndpointRegistrationFromContainer trys to get the object by type, will not panic, returns nil and error

func SafeGetManyIServiceEndpointRegistrationFromContainer

func SafeGetManyIServiceEndpointRegistrationFromContainer(ctn di.Container) ([]IServiceEndpointRegistration, error)

SafeGetManyIServiceEndpointRegistrationFromContainer trys to get the object by type, will not panic, returns nil and error

Jump to

Keyboard shortcuts

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