connector

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MPL-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearOAuth2Cache

func ClearOAuth2Cache()

func ResetSharedHTTPListeners

func ResetSharedHTTPListeners()

ResetSharedHTTPListeners tears down all shared listeners. Intended for tests.

Types

type ChannelBus

type ChannelBus struct {
	// contains filtered or unexported fields
}

func GetChannelBus

func GetChannelBus() *ChannelBus

func (*ChannelBus) Publish

func (cb *ChannelBus) Publish(channelID string, msg *message.Message)

func (*ChannelBus) Subscribe

func (cb *ChannelBus) Subscribe(channelID string) chan *message.Message

type ChannelDest

type ChannelDest struct {
	// contains filtered or unexported fields
}

func NewChannelDest

func NewChannelDest(name, targetChannelID string, logger *slog.Logger) *ChannelDest

func (*ChannelDest) Send

func (*ChannelDest) Stop

func (c *ChannelDest) Stop(ctx context.Context) error

func (*ChannelDest) Type

func (c *ChannelDest) Type() string

type ChannelSource

type ChannelSource struct {
	// contains filtered or unexported fields
}

func NewChannelSource

func NewChannelSource(cfg *config.ChannelListener, logger *slog.Logger) *ChannelSource

func (*ChannelSource) Start

func (c *ChannelSource) Start(ctx context.Context, handler MessageHandler) error

func (*ChannelSource) Stop

func (c *ChannelSource) Stop(ctx context.Context) error

func (*ChannelSource) Type

func (c *ChannelSource) Type() string

type DICOMDest

type DICOMDest struct {
	// contains filtered or unexported fields
}

func NewDICOMDest

func NewDICOMDest(name string, cfg *config.DICOMDestMapConfig, logger *slog.Logger) *DICOMDest

func (*DICOMDest) Send

func (d *DICOMDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*DICOMDest) Stop

func (d *DICOMDest) Stop(ctx context.Context) error

func (*DICOMDest) Type

func (d *DICOMDest) Type() string

type DICOMSource

type DICOMSource struct {
	// contains filtered or unexported fields
}

func NewDICOMSource

func NewDICOMSource(cfg *config.DICOMListener, logger *slog.Logger) *DICOMSource

func (*DICOMSource) Addr added in v1.0.6

func (d *DICOMSource) Addr() string

func (*DICOMSource) Start

func (d *DICOMSource) Start(ctx context.Context, handler MessageHandler) error

func (*DICOMSource) Stop

func (d *DICOMSource) Stop(ctx context.Context) error

func (*DICOMSource) Type

func (d *DICOMSource) Type() string

type DatabaseDest

type DatabaseDest struct {
	// contains filtered or unexported fields
}

func NewDatabaseDest

func NewDatabaseDest(name string, cfg *config.DBDestMapConfig, logger *slog.Logger) *DatabaseDest

func (*DatabaseDest) Send

func (*DatabaseDest) Stop

func (d *DatabaseDest) Stop(ctx context.Context) error

func (*DatabaseDest) Type

func (d *DatabaseDest) Type() string

type DatabaseSource

type DatabaseSource struct {
	// contains filtered or unexported fields
}

func NewDatabaseSource

func NewDatabaseSource(cfg *config.DBListener, logger *slog.Logger) *DatabaseSource

func (*DatabaseSource) Start

func (d *DatabaseSource) Start(ctx context.Context, handler MessageHandler) error

func (*DatabaseSource) Stop

func (d *DatabaseSource) Stop(ctx context.Context) error

func (*DatabaseSource) Type

func (d *DatabaseSource) Type() string

type DestinationConnector

type DestinationConnector interface {
	Send(ctx context.Context, msg *message.Message) (*message.Response, error)
	Stop(ctx context.Context) error
	Type() string
}

type DirectDest

type DirectDest struct {
	// contains filtered or unexported fields
}

DirectDest implements the Direct messaging protocol for healthcare (Direct Project / Direct Secure Messaging). It sends messages via SMTP/S with S/MIME encryption using certificates.

func NewDirectDest

func NewDirectDest(name string, cfg *config.DirectDestMapConfig, logger *slog.Logger) *DirectDest

func (*DirectDest) Send

func (d *DirectDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*DirectDest) Stop

func (d *DirectDest) Stop(ctx context.Context) error

func (*DirectDest) Type

func (d *DirectDest) Type() string

type EmailSource

type EmailSource struct {
	// contains filtered or unexported fields
}

func NewEmailSource

func NewEmailSource(cfg *config.EmailListener, logger *slog.Logger) *EmailSource

func (*EmailSource) Start

func (e *EmailSource) Start(ctx context.Context, handler MessageHandler) error

func (*EmailSource) Stop

func (e *EmailSource) Stop(ctx context.Context) error

func (*EmailSource) Type

func (e *EmailSource) Type() string

type FHIRDest

type FHIRDest struct {
	// contains filtered or unexported fields
}

func NewFHIRDest

func NewFHIRDest(name string, cfg *config.FHIRDestMapConfig, logger *slog.Logger) *FHIRDest

func (*FHIRDest) Send

func (f *FHIRDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*FHIRDest) Stop

func (f *FHIRDest) Stop(ctx context.Context) error

func (*FHIRDest) Type

func (f *FHIRDest) Type() string

type FHIRPollSource added in v1.0.10

type FHIRPollSource struct {
	// contains filtered or unexported fields
}

func NewFHIRPollSource added in v1.0.10

func NewFHIRPollSource(cfg *config.FHIRPollListener, logger *slog.Logger) *FHIRPollSource

func (*FHIRPollSource) Start added in v1.0.10

func (f *FHIRPollSource) Start(ctx context.Context, handler MessageHandler) error

func (*FHIRPollSource) Stop added in v1.0.10

func (f *FHIRPollSource) Stop(ctx context.Context) error

func (*FHIRPollSource) Type added in v1.0.10

func (f *FHIRPollSource) Type() string

type FHIRSource

type FHIRSource struct {
	// contains filtered or unexported fields
}

func NewFHIRSource

func NewFHIRSource(cfg *config.FHIRListener, logger *slog.Logger) *FHIRSource

func (*FHIRSource) Addr added in v1.0.6

func (f *FHIRSource) Addr() string

func (*FHIRSource) Start

func (f *FHIRSource) Start(ctx context.Context, handler MessageHandler) error

func (*FHIRSource) Stop

func (f *FHIRSource) Stop(ctx context.Context) error

func (*FHIRSource) Type

func (f *FHIRSource) Type() string

type FHIRSubscriptionSource added in v1.0.10

type FHIRSubscriptionSource struct {
	// contains filtered or unexported fields
}

func NewFHIRSubscriptionSource added in v1.0.10

func NewFHIRSubscriptionSource(cfg *config.FHIRSubscriptionListener, logger *slog.Logger) *FHIRSubscriptionSource

func (*FHIRSubscriptionSource) Addr added in v1.0.10

func (f *FHIRSubscriptionSource) Addr() string

Addr returns the listener address for rest-hook (e.g. "127.0.0.1:9090"). Empty for websocket.

func (*FHIRSubscriptionSource) Start added in v1.0.10

func (*FHIRSubscriptionSource) Stop added in v1.0.10

func (*FHIRSubscriptionSource) Type added in v1.0.10

func (f *FHIRSubscriptionSource) Type() string

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory(logger *slog.Logger) *Factory

func (*Factory) CreateDestination

func (f *Factory) CreateDestination(name string, dest config.Destination) (DestinationConnector, error)

func (*Factory) CreateSource

func (f *Factory) CreateSource(listenerCfg config.ListenerConfig) (SourceConnector, error)

type FileDest

type FileDest struct {
	// contains filtered or unexported fields
}

func NewFileDest

func NewFileDest(name string, cfg *config.FileDestMapConfig, logger *slog.Logger) *FileDest

func (*FileDest) Send

func (f *FileDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*FileDest) Stop

func (f *FileDest) Stop(ctx context.Context) error

func (*FileDest) Type

func (f *FileDest) Type() string

type FileSource

type FileSource struct {
	// contains filtered or unexported fields
}

func NewFileSource

func NewFileSource(cfg *config.FileListener, logger *slog.Logger) *FileSource

func (*FileSource) Start

func (f *FileSource) Start(ctx context.Context, handler MessageHandler) error

func (*FileSource) Stop

func (f *FileSource) Stop(ctx context.Context) error

func (*FileSource) Type

func (f *FileSource) Type() string

type HTTPDest

type HTTPDest struct {
	// contains filtered or unexported fields
}

func NewHTTPDest

func NewHTTPDest(name string, cfg *config.HTTPDestConfig, logger *slog.Logger) *HTTPDest

func (*HTTPDest) Send

func (h *HTTPDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*HTTPDest) Stop

func (h *HTTPDest) Stop(ctx context.Context) error

func (*HTTPDest) Type

func (h *HTTPDest) Type() string

type HTTPSource

type HTTPSource struct {
	// contains filtered or unexported fields
}

func NewHTTPSource

func NewHTTPSource(cfg *config.HTTPListener, logger *slog.Logger) *HTTPSource

func (*HTTPSource) Addr

func (h *HTTPSource) Addr() string

func (*HTTPSource) Start

func (h *HTTPSource) Start(ctx context.Context, handler MessageHandler) error

func (*HTTPSource) Stop

func (h *HTTPSource) Stop(ctx context.Context) error

func (*HTTPSource) Type

func (h *HTTPSource) Type() string

type IHESource

type IHESource struct {
	// contains filtered or unexported fields
}

func NewIHESource

func NewIHESource(cfg *config.IHEListener, logger *slog.Logger) *IHESource

func (*IHESource) Addr added in v1.0.6

func (i *IHESource) Addr() string

func (*IHESource) Start

func (i *IHESource) Start(ctx context.Context, handler MessageHandler) error

func (*IHESource) Stop

func (i *IHESource) Stop(ctx context.Context) error

func (*IHESource) Type

func (i *IHESource) Type() string

type JMSDest

type JMSDest struct {
	// contains filtered or unexported fields
}

JMSDest sends messages to a JMS provider via its HTTP/REST bridge API. JMS providers like ActiveMQ, IBM MQ, and others expose REST endpoints for message enqueue operations.

func NewJMSDest

func NewJMSDest(name string, cfg *config.JMSDestMapConfig, logger *slog.Logger) *JMSDest

func (*JMSDest) Send

func (j *JMSDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*JMSDest) Stop

func (j *JMSDest) Stop(ctx context.Context) error

func (*JMSDest) Type

func (j *JMSDest) Type() string

type KafkaDest

type KafkaDest struct {
	// contains filtered or unexported fields
}

func NewKafkaDest

func NewKafkaDest(name string, cfg *config.KafkaDestConfig, logger *slog.Logger) *KafkaDest

func (*KafkaDest) Send

func (k *KafkaDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*KafkaDest) Stop

func (k *KafkaDest) Stop(ctx context.Context) error

func (*KafkaDest) Type

func (k *KafkaDest) Type() string

type KafkaSource

type KafkaSource struct {
	// contains filtered or unexported fields
}

func NewKafkaSource

func NewKafkaSource(cfg *config.KafkaListener, logger *slog.Logger) *KafkaSource

func (*KafkaSource) Start

func (k *KafkaSource) Start(ctx context.Context, handler MessageHandler) error

func (*KafkaSource) Stop

func (k *KafkaSource) Stop(ctx context.Context) error

func (*KafkaSource) Type

func (k *KafkaSource) Type() string

type LogDest

type LogDest struct {
	// contains filtered or unexported fields
}

func NewLogDest

func NewLogDest(name string, logger *slog.Logger) *LogDest

func (*LogDest) Send

func (l *LogDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*LogDest) Stop

func (l *LogDest) Stop(ctx context.Context) error

func (*LogDest) Type

func (l *LogDest) Type() string

type MessageHandler

type MessageHandler func(ctx context.Context, msg *message.Message) error

type SFTPDest

type SFTPDest struct {
	// contains filtered or unexported fields
}

func NewSFTPDest

func NewSFTPDest(name string, cfg *config.SFTPDestMapConfig, logger *slog.Logger) *SFTPDest

func (*SFTPDest) Send

func (s *SFTPDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*SFTPDest) Stop

func (s *SFTPDest) Stop(ctx context.Context) error

func (*SFTPDest) Type

func (s *SFTPDest) Type() string

type SFTPSource

type SFTPSource struct {
	// contains filtered or unexported fields
}

func NewSFTPSource

func NewSFTPSource(cfg *config.SFTPListener, logger *slog.Logger) *SFTPSource

func (*SFTPSource) Start

func (s *SFTPSource) Start(ctx context.Context, handler MessageHandler) error

func (*SFTPSource) Stop

func (s *SFTPSource) Stop(ctx context.Context) error

func (*SFTPSource) Type

func (s *SFTPSource) Type() string

type SMTPDest

type SMTPDest struct {
	// contains filtered or unexported fields
}

func NewSMTPDest

func NewSMTPDest(name string, cfg *config.SMTPDestMapConfig, logger *slog.Logger) *SMTPDest

func (*SMTPDest) Send

func (s *SMTPDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*SMTPDest) Stop

func (s *SMTPDest) Stop(ctx context.Context) error

func (*SMTPDest) Type

func (s *SMTPDest) Type() string

type SOAPSource

type SOAPSource struct {
	// contains filtered or unexported fields
}

func NewSOAPSource

func NewSOAPSource(cfg *config.SOAPListener, logger *slog.Logger) *SOAPSource

func (*SOAPSource) Addr added in v1.0.6

func (s *SOAPSource) Addr() string

func (*SOAPSource) Start

func (s *SOAPSource) Start(ctx context.Context, handler MessageHandler) error

func (*SOAPSource) Stop

func (s *SOAPSource) Stop(ctx context.Context) error

func (*SOAPSource) Type

func (s *SOAPSource) Type() string

type SourceConnector

type SourceConnector interface {
	Start(ctx context.Context, handler MessageHandler) error
	Stop(ctx context.Context) error
	Type() string
}

type StubSource

type StubSource struct {
	// contains filtered or unexported fields
}

func NewStubSource

func NewStubSource(connType string, logger *slog.Logger) *StubSource

func (*StubSource) Start

func (s *StubSource) Start(ctx context.Context, handler MessageHandler) error

func (*StubSource) Stop

func (s *StubSource) Stop(ctx context.Context) error

func (*StubSource) Type

func (s *StubSource) Type() string

type TCPDest

type TCPDest struct {
	// contains filtered or unexported fields
}

func NewTCPDest

func NewTCPDest(name string, cfg *config.TCPDestMapConfig, logger *slog.Logger) *TCPDest

func (*TCPDest) Send

func (t *TCPDest) Send(ctx context.Context, msg *message.Message) (*message.Response, error)

func (*TCPDest) Stop

func (t *TCPDest) Stop(ctx context.Context) error

func (*TCPDest) Type

func (t *TCPDest) Type() string

type TCPSource

type TCPSource struct {
	// contains filtered or unexported fields
}

func NewTCPSource

func NewTCPSource(cfg *config.TCPListener, logger *slog.Logger) *TCPSource

func (*TCPSource) Addr

func (t *TCPSource) Addr() string

func (*TCPSource) Start

func (t *TCPSource) Start(ctx context.Context, handler MessageHandler) error

func (*TCPSource) Stop

func (t *TCPSource) Stop(ctx context.Context) error

func (*TCPSource) Type

func (t *TCPSource) Type() string

Jump to

Keyboard shortcuts

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