Documentation
¶
Index ¶
- Constants
- func ExtractActorContext(ctx context.Context) actor.Context
- func Wrap(_ context.Context, camelContext Context) context.Context
- type Closer
- type Component
- type Consumer
- type ConsumerFactory
- type Context
- type ContextKey
- type Endpoint
- type Identifiable
- type Message
- type Parameters
- type Predicate
- type Processor
- type Producer
- type ProducerFactory
- type Properties
- type PropertiesResolver
- type RawJSON
- type Registry
- type Service
- type Transformer
- type TypeConverter
- type Verticle
Constants ¶
View Source
const ( ContextKeyCamelContext = ContextKey("camel-context") ContextKeyActorContext = ContextKey("actor-context") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Component ¶
type Component interface {
Identifiable
Context() Context
Scheme() string
Endpoint(Parameters) (Endpoint, error)
Logger() *slog.Logger
}
type ConsumerFactory ¶
type Context ¶
type Context interface {
Identifiable
Service
Closer
Registry() Registry
Properties() Properties
TypeConverter() TypeConverter
LoadRoutes(ctx context.Context, in io.Reader) error
// Spawn ---
// TODO: must be hidden
// TODO: each route must have its own context/supervisor
Spawn(Verticle) (*actor.PID, error)
// Send ---
Send(string, Message) error
// SendTo ---
// TODO: must be hidden maybe
SendTo(*actor.PID, Message) error
// SendToAs ---
// TODO: must be hidden maybe
SendToAs(*actor.PID, *actor.PID, Message) error
// Receive ---
Receive(string, time.Duration) (Message, error)
// Request ---
// TODO: must be hidden maybe
RequestTo(*actor.PID, Message, time.Duration) (Message, error)
Logger() *slog.Logger
NewMessage() Message
}
func ExtractContext ¶
type ContextKey ¶
type ContextKey string
type Identifiable ¶
type Identifiable interface {
ID() string
}
type Message ¶
type Message interface {
ID() string
Time() time.Time
Context() Context
Type() string
Source() string
Subject() string
ContentSchema() string
ContentType() string
SetType(string)
SetSource(string)
SetSubject(string)
SetContentSchema(string)
SetContentType(string)
// Content ---
// TODO: add options Content(opt.AsType(baz{})).
Content() interface{}
SetContent(interface{})
// Error ---
Error() error
SetError(error)
// Headers ---
Headers() map[string]any
SetHeaders(map[string]any)
Header(string) (any, bool)
SetHeader(string, any)
EachHeader(func(string, any) error) error
// Attributes ---
Attributes() map[string]any
SetAttributes(map[string]any)
Attribute(string) (any, bool)
SetAttribute(string, any)
EachAttribute(func(string, any) error) error
CopyTo(message Message) error
}
type Parameters ¶
type Parameters map[string]interface{}
type ProducerFactory ¶
type Properties ¶
type Properties interface {
PropertiesResolver
Add(map[string]any) error
AddSource(string) error
View(string) PropertiesResolver
}
type PropertiesResolver ¶
type TypeConverter ¶
type Verticle ¶
type Verticle interface {
Identifiable
actor.Actor
}
Click to show internal directories.
Click to hide internal directories.