package
0.45.0
Repository: https://github.com/lerenn/asyncapi-codegen.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

DefaultErrorHandler returns the default error handler, which is a Noop errorhandler.
IfContextNotSetWith executes the function if the key is not set in the context.
IfContextSetWith executes the function if the key is set in the context.
IfContextValueEquals executes the function if the key is set in the context as a given type and the value is equal to the expected value.
NewAcknowledgeableBrokerMessage return a new AcknowledgeableBrokerMessage from BrokerMessage and BrokerAcknowledgment.
NewBrokerChannelSubscription creates a new broker channel subscription based on the channels used to receive message and cancel the subscription.

# Constants

ContextKeyIsBrokerMessage is the message that has been sent or received from/to the broker.
ContextKeyIsChannel is the name of the channel this data is coming from.
ContextKeyIsCorrelationID is the correlation ID of the message.
ContextKeyIsDirection is the direction this data is coming from.
ContextKeyIsProvider is the name of the provider this data is coming from.
ContextKeyIsVersion is the AsyncAPI specification version.
Prefix is the prefix used for all context keys in order to avoid collision with other keys that can be present in context.

# Variables

ErrAlreadySubscribedChannel is raised when a subscription is done twice or more without unsubscribing.
ErrAsyncAPI is the generic error for AsyncAPI generated code.
ErrChannelAddressEmpty is raised when a given channel address is empty, when dynamically set from message.
ErrContextCanceled is given when a given context is canceled.
ErrNilAppSubscriber is raised when a nil app subscriber is used (asyncapiv2 only).
ErrNilBrokerController is raised when a nil broker controller is user.
ErrNilUserSubscriber is raised when a nil user subscriber is used (asyncapiv2 only).
ErrNoCorrelationIDSet is raised when a correlation ID is expected, but none is detected.
ErrSubscriptionCanceled is raised when expecting something and the subscription has been canceled before it happens.

# Structs

AcknowledgeableBrokerMessage is the struct that embeds BrokerMessage and provide a BrokerAcknowledgment to acknowledge a message to the broker depending on the implementation.
BrokerChannelSubscription is a struct that contains every returned structures when subscribing a channel.
BrokerMessage is a wrapper that will contain all information regarding a message.
DummyLogger is a logger that does not log anything.
LogInfo is a key-value pair that will be added to the log.

# Interfaces

BrokerAcknowledgment represents the function that should be implemented to acknowledge a message from subscriber to the broker.
BrokerController represents the functions that should be implemented to connect the broker to the application or the user.
Logger is the interface that must be implemented by a logger.

# Type aliases

ContextKey is the type of the keys used in the context.
ErrorHandler is the signature of the function that needs to be implemented to use errorhandler functionality.
Middleware is the signature of the function that needs to be implemented to use middleware functionnality Message sent to or received from is passed as an argument.
NextMiddleware represents the next middleware that can be executed during the previous middleware.