Documentation ¶
Index ¶
- Constants
- type Bindable
- type BindableType
- type Config
- type Connector
- type ConnectorOpts
- type ConnectorWorker
- type Forwarder
- type Headers
- type HealthCheckFunc
- type HttpError
- type InboundConnector
- type InboundDescriptor
- type InboundRequest
- type InboundResponse
- type Ingress
- type Logger
- type MessageDescriptor
- type MessageType
- type Option
- type OutboundConnector
- type OutboundDescriptor
- type OutboundRequest
- type OutboundResponse
- type StartContext
- type StopContext
Constants ¶
View Source
const ( BindableTypeJson = "json" BindableTypeYaml = "yaml" BindableTypeUnknown = "" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bindable ¶
func NewBindable ¶ added in v1.30.0
func NewBindable(data []byte, tp BindableType) Bindable
type BindableType ¶ added in v1.30.0
type BindableType string
type Config ¶ added in v1.30.0
type Config struct { Ingress []ingressConfig `yaml:"ingress"` ConnectorConfig connectorConfig `yaml:"config"` }
type Connector ¶
type Connector interface { // Start can be used to initialise your server or client // Note: This function should return and not block Start(ctx StartContext) error Stop(ctx StopContext) error }
type ConnectorOpts ¶ added in v1.30.0
type ConnectorOpts struct {
// contains filtered or unexported fields
}
type ConnectorWorker ¶ added in v1.30.0
type ConnectorWorker interface {
Run()
}
func NewConnectorWorker ¶ added in v1.30.0
func NewConnectorWorker(connector Connector, options ...Option) (ConnectorWorker, error)
type Forwarder ¶
type Forwarder interface {
Forward(name string, body []byte, headers Headers) (InboundResponse, error)
}
type HealthCheckFunc ¶ added in v1.30.0
type HealthCheckFunc func() error
type HttpError ¶ added in v1.30.0
type InboundConnector ¶
type InboundConnector interface { Connector }
type InboundDescriptor ¶
type InboundDescriptor interface { MessageDescriptor }
type InboundRequest ¶ added in v1.30.0
type InboundResponse ¶
type InboundResponse interface {
// contains filtered or unexported methods
}
type MessageDescriptor ¶ added in v1.30.0
type MessageDescriptor interface { Name() string MessageName() string MimeType() string MessageType() MessageType Config() Bindable }
type MessageType ¶ added in v1.30.0
type MessageType string
const MessageTypeInbound MessageType = "inbound"
const MessageTypeOutbound MessageType = "outbound"
type Option ¶ added in v1.30.0
type Option = func(je *ConnectorOpts) *ConnectorOpts
func WithConfig ¶ added in v1.30.0
func WithConfigBasePath ¶ added in v1.30.0
func WithForwarder ¶ added in v1.30.0
type OutboundConnector ¶
type OutboundConnector interface { Connector HandleOutboundRequest(request OutboundRequest) (any, Headers, error) // see line 26, please }
type OutboundDescriptor ¶
type OutboundDescriptor interface { MessageDescriptor }
type OutboundRequest ¶
type OutboundResponse ¶ added in v1.30.0
type OutboundResponse interface {
// contains filtered or unexported methods
}
type StartContext ¶
type StartContext interface { Config() Bindable Ingress(name string) (Ingress, error) InboundDescriptors() []InboundDescriptor OutboundDescriptors() []OutboundDescriptor Forwarder() Forwarder Log() Logger RegisterPeriodicHealthCheck(name string, fn HealthCheckFunc) }
type StopContext ¶
type StopContext interface {
Log() Logger
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.