bindings

package
v0.0.0-...-949823d Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCInputBinding

func NewGRPCInputBinding(l logger.Logger, socket string) *grpcInputBinding

NewGRPCInputBinding creates a new grpc inputbindingusing the given socket factory.

func NewGRPCOutputBinding

func NewGRPCOutputBinding(l logger.Logger, socket string) *grpcOutputBinding

NewGRPCOutputBinding creates a new grpc outputbinding using the given socket factory.

Types

type Registry

type Registry struct {
	Logger logger.Logger
	// contains filtered or unexported fields
}

Registry is the interface of a components that allows callers to get registered instances of input and output bindings.

var DefaultRegistry *Registry = NewRegistry()

DefaultRegistry is the singleton with the registry.

func NewRegistry

func NewRegistry() *Registry

NewRegistry is used to create new bindings.

func (*Registry) CreateInputBinding

func (b *Registry) CreateInputBinding(name, version, logName string) (bindings.InputBinding, error)

CreateInputBinding Create instantiates an input binding based on `name`.

func (*Registry) CreateOutputBinding

func (b *Registry) CreateOutputBinding(name, version, logName string) (bindings.OutputBinding, error)

CreateOutputBinding Create instantiates an output binding based on `name`.

func (*Registry) HasInputBinding

func (b *Registry) HasInputBinding(name, version string) bool

HasInputBinding checks if an input binding based on `name` exists in the registry.

func (*Registry) HasOutputBinding

func (b *Registry) HasOutputBinding(name, version string) bool

HasOutputBinding checks if an output binding based on `name` exists in the registry.

func (*Registry) RegisterInputBinding

func (b *Registry) RegisterInputBinding(componentFactory func(logger.Logger) bindings.InputBinding, names ...string)

RegisterInputBinding adds a name input binding to the registry.

func (*Registry) RegisterOutputBinding

func (b *Registry) RegisterOutputBinding(componentFactory func(logger.Logger) bindings.OutputBinding, names ...string)

RegisterOutputBinding adds a name output binding to the registry.

Jump to

Keyboard shortcuts

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