config

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverChannelDirs added in v1.0.3

func DiscoverChannelDirs(channelsDir string) ([]string, error)

DiscoverChannelDirs recursively walks channelsDir and returns absolute paths to every directory that contains a channel.yaml file.

func FindChannelDir added in v1.0.3

func FindChannelDir(channelsDir, channelID string) (string, error)

FindChannelDir recursively searches channelsDir for a channel whose channel.yaml has the given id. Returns the absolute path to that directory or an error if not found.

func ListenerEndpoint

func ListenerEndpoint(ch *ChannelConfig) (port int, path string)

ListenerEndpoint extracts the port and path from a channel's listener config. Returns port=0 for non-HTTP listener types (tcp, file, etc.) which are skipped during duplicate detection.

func ValidateListenerEndpoints

func ValidateListenerEndpoints(channels []*ChannelConfig) []string

ValidateListenerEndpoints checks that no two enabled channels share the same port+path combination. Returns a list of human-readable error strings (empty if no duplicates).

Types

type ACKConfig

type ACKConfig struct {
	Auto        bool   `yaml:"auto,omitempty"`
	SuccessCode string `yaml:"success_code,omitempty"`
	ErrorCode   string `yaml:"error_code,omitempty"`
	RejectCode  string `yaml:"reject_code,omitempty"`
}

type AWSSecretsManagerConfig

type AWSSecretsManagerConfig struct {
	Region    string `mapstructure:"region"`
	AccessKey string `mapstructure:"access_key"`
	SecretKey string `mapstructure:"secret_key"`
	CacheTTL  string `mapstructure:"cache_ttl"`
}

type AccessControlConfig

type AccessControlConfig struct {
	Enabled  bool        `mapstructure:"enabled"`
	Provider string      `mapstructure:"provider"`
	LDAP     *LDAPConfig `mapstructure:"ldap"`
	OIDC     *OIDCConfig `mapstructure:"oidc"`
}

type AlertConfig

type AlertConfig struct {
	Name         string       `mapstructure:"name"`
	Trigger      AlertTrigger `mapstructure:"trigger"`
	Destinations []string     `mapstructure:"destinations"`
}

type AlertRefConfig

type AlertRefConfig struct {
	Destination string `yaml:"destination,omitempty"`
}

type AlertTrigger

type AlertTrigger struct {
	Type        string `mapstructure:"type"`
	Channel     string `mapstructure:"channel"`
	Threshold   int    `mapstructure:"threshold"`
	Window      string `mapstructure:"window"`
	ThresholdMs int    `mapstructure:"threshold_ms"`
	Percentile  string `mapstructure:"percentile"`
}

type AttachmentsConfig

type AttachmentsConfig struct {
	Enabled           bool   `yaml:"enabled,omitempty"`
	Store             string `yaml:"store,omitempty"`
	MaxSizeMB         int    `yaml:"max_size_mb,omitempty"`
	InlineThresholdKB int    `yaml:"inline_threshold_kb,omitempty"`
	Directory         string `yaml:"directory,omitempty"`
	Bucket            string `yaml:"bucket,omitempty"`
	Region            string `yaml:"region,omitempty"`
}

type AuditConfig

type AuditConfig struct {
	Enabled     bool     `mapstructure:"enabled"`
	Destination string   `mapstructure:"destination"`
	DSN         string   `mapstructure:"dsn"`
	Events      []string `mapstructure:"events"`
}

type AuthConfig

type AuthConfig struct {
	Type            string   `yaml:"type"`
	Username        string   `yaml:"username,omitempty"`
	Password        string   `yaml:"password,omitempty"`
	Token           string   `yaml:"token,omitempty"`
	Key             string   `yaml:"key,omitempty"`
	Header          string   `yaml:"header,omitempty"`
	QueryParam      string   `yaml:"query_param,omitempty"`
	TokenURL        string   `yaml:"token_url,omitempty"`
	AuthURL         string   `yaml:"auth_url,omitempty"`
	ClientID        string   `yaml:"client_id,omitempty"`
	ClientSecret    string   `yaml:"client_secret,omitempty"`
	Scopes          []string `yaml:"scopes,omitempty"`
	RedirectURI     string   `yaml:"redirect_uri,omitempty"`
	CAFile          string   `yaml:"ca_file,omitempty"`
	ClientCertFile  string   `yaml:"client_cert_file,omitempty"`
	ClientKeyFile   string   `yaml:"client_key_file,omitempty"`
	PrivateKeyFile  string   `yaml:"private_key_file,omitempty"`
	Passphrase      string   `yaml:"passphrase,omitempty"`
	Mechanism       string   `yaml:"mechanism,omitempty"`
	Handler         string   `yaml:"handler,omitempty"`
	AccessKeyID     string   `yaml:"access_key_id,omitempty"`
	SecretAccessKey string   `yaml:"secret_access_key,omitempty"`
	Domain          string   `yaml:"domain,omitempty"`
}

type AutoResponseConfig

type AutoResponseConfig struct {
	Enabled     bool   `yaml:"enabled,omitempty"`
	Type        string `yaml:"type,omitempty"`
	SuccessCode string `yaml:"success_code,omitempty"`
	ErrorCode   string `yaml:"error_code,omitempty"`
	RejectCode  string `yaml:"reject_code,omitempty"`
}

type BatchConfig

type BatchConfig struct {
	Enabled        bool   `yaml:"enabled,omitempty"`
	Type           string `yaml:"type,omitempty"`
	SplitOn        string `yaml:"split_on,omitempty"`
	CustomSplitter string `yaml:"custom_splitter,omitempty"`
	MaxBatchSize   int    `yaml:"max_batch_size,omitempty"`
	BatchTimeoutMs int    `yaml:"batch_timeout_ms,omitempty"`
}

type ChannelAssignConfig

type ChannelAssignConfig struct {
	Strategy    string              `mapstructure:"strategy"`
	TagAffinity map[string][]string `mapstructure:"tag_affinity"`
}

type ChannelConfig

type ChannelConfig struct {
	ID          string   `yaml:"id"`
	Enabled     bool     `yaml:"enabled"`
	Description string   `yaml:"description,omitempty"`
	Profiles    []string `yaml:"profiles,omitempty"`

	Tags     []string `yaml:"tags,omitempty"`
	Group    string   `yaml:"group,omitempty"`
	Priority string   `yaml:"priority,omitempty"`

	DataTypes *DataTypesConfig `yaml:"data_types,omitempty"`
	Listener  ListenerConfig   `yaml:"listener"`

	Pipeline    *PipelineConfig `yaml:"pipeline,omitempty"`
	Validator   *ScriptRef      `yaml:"validator,omitempty"`
	Transformer *ScriptRef      `yaml:"transformer,omitempty"`

	Destinations []ChannelDestination `yaml:"destinations,omitempty"`

	Logging        *ChannelLogging       `yaml:"logging,omitempty"`
	ErrorHandling  *ErrorHandlingConfig  `yaml:"error_handling,omitempty"`
	Lifecycle      *LifecycleConfig      `yaml:"lifecycle,omitempty"`
	MessageStorage *ChannelStorageConfig `yaml:"message_storage,omitempty"`
	Batch          *BatchConfig          `yaml:"batch,omitempty"`
	Attachments    *AttachmentsConfig    `yaml:"attachments,omitempty"`
	Tracing        *TracingConfig        `yaml:"tracing,omitempty"`
	Performance    *PerformanceConfig    `yaml:"performance,omitempty"`
	Pruning        *ChannelPruningConfig `yaml:"pruning,omitempty"`
	Plugins        []PluginConfig        `yaml:"plugins,omitempty"`
	DependsOn      []string              `yaml:"depends_on,omitempty"`
	StartupOrder   int                   `yaml:"startup_order,omitempty"`
	CodeTemplates  []string              `yaml:"code_templates,omitempty"`
	AutoResponse   *AutoResponseConfig   `yaml:"auto_response,omitempty"`
}

func LoadChannelConfig

func LoadChannelConfig(channelDir string) (*ChannelConfig, error)

func (*ChannelConfig) MatchesProfile added in v1.0.2

func (c *ChannelConfig) MatchesProfile(active string) bool

MatchesProfile reports whether the channel should be loaded for the given active profile. Channels with an empty Profiles list match every profile.

type ChannelDestMapConfig

type ChannelDestMapConfig struct {
	TargetChannelID string `mapstructure:"target_channel_id"`
}

type ChannelDestRef

type ChannelDestRef struct {
	TargetChannelID string `yaml:"target_channel_id"`
}

type ChannelDestination

type ChannelDestination struct {
	Name                string            `yaml:"name,omitempty"`
	Ref                 string            `yaml:"ref,omitempty"`
	Type                string            `yaml:"type,omitempty"`
	HTTP                *HTTPDestConfig   `yaml:"http,omitempty"`
	Kafka               *KafkaDestConfig  `yaml:"kafka,omitempty"`
	TCP                 *TCPDestConfig    `yaml:"tcp,omitempty"`
	File                *FileDestConfig   `yaml:"file,omitempty"`
	Database            *DBDestConfig     `yaml:"database,omitempty"`
	SMTP                *SMTPDestConfig   `yaml:"smtp,omitempty"`
	ChannelDest         *ChannelDestRef   `yaml:"channel,omitempty"`
	DICOM               *DICOMDestConfig  `yaml:"dicom,omitempty"`
	JMS                 *JMSDestConfig    `yaml:"jms,omitempty"`
	FHIR                *FHIRDestConfig   `yaml:"fhir,omitempty"`
	Direct              *DirectDestConfig `yaml:"direct,omitempty"`
	Filter              string            `yaml:"filter,omitempty"`
	Transformer         *ScriptRef        `yaml:"transformer,omitempty"`
	ResponseTransformer *ScriptRef        `yaml:"response_transformer,omitempty"`
	Queue               *QueueConfig      `yaml:"queue,omitempty"`
	Retry               *RetryConfig      `yaml:"retry,omitempty"`
}

func (*ChannelDestination) ToDestination added in v1.0.4

func (cd *ChannelDestination) ToDestination() Destination

ToDestination converts an inline ChannelDestination to a root-level Destination so the connector factory can create it without a named ref.

func (*ChannelDestination) UnmarshalYAML

func (cd *ChannelDestination) UnmarshalYAML(value *yaml.Node) error

type ChannelListener

type ChannelListener struct {
	SourceChannelID string `yaml:"source_channel_id"`
}

type ChannelLogging

type ChannelLogging struct {
	Level      string          `yaml:"level,omitempty"`
	Payloads   *PayloadLogging `yaml:"payloads,omitempty"`
	TruncateAt int             `yaml:"truncate_at,omitempty"`
}

type ChannelPruningConfig

type ChannelPruningConfig struct {
	RetentionDays int  `yaml:"retention_days,omitempty"`
	PruneErrored  bool `yaml:"prune_errored,omitempty"`
}

type ChannelStorageConfig

type ChannelStorageConfig struct {
	Enabled       bool     `yaml:"enabled,omitempty"`
	Mode          string   `yaml:"mode,omitempty"`
	Stages        []string `yaml:"stages,omitempty"`
	ContentTypes  []string `yaml:"content_types,omitempty"`
	RetentionDays int      `yaml:"retention_days,omitempty"`
}

type CloudWatchLogConfig

type CloudWatchLogConfig struct {
	Region    string `mapstructure:"region"`
	LogGroup  string `mapstructure:"log_group"`
	LogStream string `mapstructure:"log_stream"`
}

type ClusterConfig

type ClusterConfig struct {
	Enabled           bool                 `mapstructure:"enabled"`
	Mode              string               `mapstructure:"mode"`
	Coordination      *CoordinationConfig  `mapstructure:"coordination"`
	InstanceID        string               `mapstructure:"instance_id"`
	HeartbeatInterval string               `mapstructure:"heartbeat_interval"`
	ChannelAssignment *ChannelAssignConfig `mapstructure:"channel_assignment"`
	Deduplication     *DeduplicationConfig `mapstructure:"deduplication"`
}

type CodeTemplateLibraryConfig

type CodeTemplateLibraryConfig struct {
	Name      string   `mapstructure:"name"`
	Directory string   `mapstructure:"directory"`
	Channels  []string `mapstructure:"channels,omitempty"`
}

type Config

type Config struct {
	Runtime        RuntimeConfig               `mapstructure:"runtime"`
	ChannelsDir    string                      `mapstructure:"channels_dir"`
	Destinations   map[string]Destination      `mapstructure:"destinations"`
	Kafka          KafkaConfig                 `mapstructure:"kafka"`
	Secrets        *SecretsConfig              `mapstructure:"secrets"`
	DeadLetter     *DeadLetterConfig           `mapstructure:"dead_letter"`
	MessageStorage *MessageStorageConfig       `mapstructure:"message_storage"`
	Pruning        *PruningConfig              `mapstructure:"pruning"`
	Observability  *ObservabilityConfig        `mapstructure:"observability"`
	Logging        *LoggingConfig              `mapstructure:"logging"`
	Alerts         []AlertConfig               `mapstructure:"alerts"`
	AccessControl  *AccessControlConfig        `mapstructure:"access_control"`
	Roles          []RoleConfig                `mapstructure:"roles"`
	Audit          *AuditConfig                `mapstructure:"audit"`
	Cluster        *ClusterConfig              `mapstructure:"cluster"`
	Global         *GlobalConfig               `mapstructure:"global"`
	Tenancy        *TenancyConfig              `mapstructure:"tenancy"`
	Dashboard      *DashboardConfig            `mapstructure:"dashboard"`
	CodeTemplates  []CodeTemplateLibraryConfig `mapstructure:"code_templates"`
}

type CoordinationConfig

type CoordinationConfig struct {
	Type  string       `mapstructure:"type"`
	Redis *RedisConfig `mapstructure:"redis"`
}

type DBDestConfig

type DBDestConfig struct {
	Driver    string `yaml:"driver,omitempty"`
	DSN       string `yaml:"dsn,omitempty"`
	Statement string `yaml:"statement,omitempty"`
}

type DBDestMapConfig

type DBDestMapConfig struct {
	Driver    string `mapstructure:"driver"`
	DSN       string `mapstructure:"dsn"`
	Statement string `mapstructure:"statement"`
	MaxConns  int    `mapstructure:"max_conns"`
}

type DBListener

type DBListener struct {
	Driver               string     `yaml:"driver"`
	DSN                  string     `yaml:"dsn"`
	PollInterval         string     `yaml:"poll_interval,omitempty"`
	Query                string     `yaml:"query,omitempty"`
	PostProcessStatement string     `yaml:"post_process_statement,omitempty"`
	TLS                  *TLSConfig `yaml:"tls,omitempty"`
}

type DICOMDestConfig

type DICOMDestConfig struct {
	Host          string `yaml:"host"`
	Port          int    `yaml:"port,omitempty"`
	AETitle       string `yaml:"ae_title,omitempty"`
	CalledAETitle string `yaml:"called_ae_title,omitempty"`
}

type DICOMDestMapConfig

type DICOMDestMapConfig struct {
	Host          string        `mapstructure:"host"`
	Port          int           `mapstructure:"port"`
	AETitle       string        `mapstructure:"ae_title"`
	CalledAETitle string        `mapstructure:"called_ae_title"`
	TimeoutMs     int           `mapstructure:"timeout_ms"`
	TLS           *TLSMapConfig `mapstructure:"tls"`
}

type DICOMListener

type DICOMListener struct {
	Port            int        `yaml:"port"`
	AETitle         string     `yaml:"ae_title,omitempty"`
	CallingAETitles []string   `yaml:"calling_ae_titles,omitempty"`
	TLS             *TLSConfig `yaml:"tls,omitempty"`
}

type DLQRefConfig

type DLQRefConfig struct {
	Destination string `yaml:"destination,omitempty"`
}

type DashboardAuthConfig

type DashboardAuthConfig struct {
	Provider         string `mapstructure:"provider"`
	Username         string `mapstructure:"username"`
	Password         string `mapstructure:"password"`
	DisableLoginPage bool   `mapstructure:"disable_login_page"`
}

type DashboardConfig

type DashboardConfig struct {
	Enabled bool                 `mapstructure:"enabled"`
	Port    int                  `mapstructure:"port"`
	Auth    *DashboardAuthConfig `mapstructure:"auth"`
}

type DataTypesConfig

type DataTypesConfig struct {
	Inbound            string         `yaml:"inbound,omitempty"`
	Outbound           string         `yaml:"outbound,omitempty"`
	InboundProperties  map[string]any `yaml:"inbound_properties,omitempty"`
	OutboundProperties map[string]any `yaml:"outbound_properties,omitempty"`
}

type DatadogLogConfig

type DatadogLogConfig struct {
	APIKey  string   `mapstructure:"api_key"`
	Site    string   `mapstructure:"site"`
	Service string   `mapstructure:"service"`
	Source  string   `mapstructure:"source"`
	Tags    []string `mapstructure:"tags"`
}

type DeadLetterConfig

type DeadLetterConfig struct {
	Enabled         bool   `mapstructure:"enabled"`
	Destination     string `mapstructure:"destination"`
	IncludeError    bool   `mapstructure:"include_error"`
	IncludeOriginal bool   `mapstructure:"include_original"`
}

type DeduplicationConfig

type DeduplicationConfig struct {
	Enabled      bool   `mapstructure:"enabled"`
	Window       string `mapstructure:"window"`
	Store        string `mapstructure:"store"`
	KeyExtractor string `mapstructure:"key_extractor"`
}

type Destination

type Destination struct {
	Type     string                `mapstructure:"type"`
	Kafka    *KafkaDestConfig      `mapstructure:"kafka"`
	HTTP     *HTTPDestConfig       `mapstructure:"http"`
	TCP      *TCPDestMapConfig     `mapstructure:"tcp"`
	File     *FileDestMapConfig    `mapstructure:"file"`
	SFTP     *SFTPDestMapConfig    `mapstructure:"sftp"`
	Database *DBDestMapConfig      `mapstructure:"database"`
	SMTP     *SMTPDestMapConfig    `mapstructure:"smtp"`
	Channel  *ChannelDestMapConfig `mapstructure:"channel"`
	DICOM    *DICOMDestMapConfig   `mapstructure:"dicom"`
	JMS      *JMSDestMapConfig     `mapstructure:"jms"`
	FHIR     *FHIRDestMapConfig    `mapstructure:"fhir"`
	Direct   *DirectDestMapConfig  `mapstructure:"direct"`
	Retry    *RetryMapConfig       `mapstructure:"retry"`
}

type DirectDestConfig

type DirectDestConfig struct {
	To          string          `yaml:"to,omitempty"`
	From        string          `yaml:"from,omitempty"`
	SMTP        *SMTPDestConfig `yaml:"smtp,omitempty"`
	Certificate string          `yaml:"certificate,omitempty"`
}

type DirectDestMapConfig

type DirectDestMapConfig struct {
	To          string        `mapstructure:"to"`
	From        string        `mapstructure:"from"`
	Certificate string        `mapstructure:"certificate"`
	SMTPHost    string        `mapstructure:"smtp_host"`
	SMTPPort    int           `mapstructure:"smtp_port"`
	TLS         *TLSMapConfig `mapstructure:"tls"`
}

type ElasticsearchLogConfig

type ElasticsearchLogConfig struct {
	URLs     []string `mapstructure:"urls"`
	Index    string   `mapstructure:"index"`
	Username string   `mapstructure:"username"`
	Password string   `mapstructure:"password"`
	APIKey   string   `mapstructure:"api_key"`
}

type EmailListener

type EmailListener struct {
	Protocol        string      `yaml:"protocol,omitempty"`
	Host            string      `yaml:"host"`
	Port            int         `yaml:"port,omitempty"`
	PollInterval    string      `yaml:"poll_interval,omitempty"`
	TLS             *TLSConfig  `yaml:"tls,omitempty"`
	Auth            *AuthConfig `yaml:"auth,omitempty"`
	Folder          string      `yaml:"folder,omitempty"`
	Filter          string      `yaml:"filter,omitempty"`
	ReadAttachments bool        `yaml:"read_attachments,omitempty"`
	DeleteAfterRead bool        `yaml:"delete_after_read,omitempty"`
}

type EncryptionConfig

type EncryptionConfig struct {
	KeyFile   string `mapstructure:"key_file"`
	Algorithm string `mapstructure:"algorithm"`
}

type ErrorHandlingConfig

type ErrorHandlingConfig struct {
	OnError string          `yaml:"on_error,omitempty"`
	DLQ     *DLQRefConfig   `yaml:"dlq,omitempty"`
	Alert   *AlertRefConfig `yaml:"alert,omitempty"`
}

type FHIRDestConfig

type FHIRDestConfig struct {
	BaseURL    string       `yaml:"base_url,omitempty"`
	Version    string       `yaml:"version,omitempty"`
	Auth       *AuthConfig  `yaml:"auth,omitempty"`
	Operations []string     `yaml:"operations,omitempty"`
	Retry      *RetryConfig `yaml:"retry,omitempty"`
}

type FHIRDestMapConfig

type FHIRDestMapConfig struct {
	BaseURL    string          `mapstructure:"base_url"`
	Version    string          `mapstructure:"version"`
	Operations []string        `mapstructure:"operations"`
	Auth       *HTTPAuthConfig `mapstructure:"auth"`
	TLS        *TLSMapConfig   `mapstructure:"tls"`
	TimeoutMs  int             `mapstructure:"timeout_ms"`
}

type FHIRListener

type FHIRListener struct {
	Port             int         `yaml:"port"`
	BasePath         string      `yaml:"base_path,omitempty"`
	Version          string      `yaml:"version,omitempty"`
	Resources        []string    `yaml:"resources,omitempty"`
	SubscriptionType string      `yaml:"subscription_type,omitempty"`
	TLS              *TLSConfig  `yaml:"tls,omitempty"`
	Auth             *AuthConfig `yaml:"auth,omitempty"`
}

type FHIRPollListener added in v1.0.10

type FHIRPollListener struct {
	BaseURL       string      `yaml:"base_url"`
	PollInterval  string      `yaml:"poll_interval,omitempty"`
	PollRange     string      `yaml:"poll_range,omitempty"` // e.g. "15m", "2h" — last N duration for _lastUpdated
	Since         string      `yaml:"since,omitempty"`      // alias for poll_range
	DateParam     string      `yaml:"date_param,omitempty"` // default _lastUpdated; or date, onset-date, etc.
	Resources     []string    `yaml:"resources,omitempty"`
	SearchQueries []string    `yaml:"search_queries,omitempty"`
	Version       string      `yaml:"version,omitempty"`
	TLS           *TLSConfig  `yaml:"tls,omitempty"`
	Auth          *AuthConfig `yaml:"auth,omitempty"`
}

FHIRPollListener configures outbound FHIR HTTP polling (GET search at interval).

type FHIRSubscriptionListener added in v1.0.10

type FHIRSubscriptionListener struct {
	ChannelType          string      `yaml:"channel_type"` // "rest-hook" | "websocket"
	Port                 int         `yaml:"port,omitempty"`
	Path                 string      `yaml:"path,omitempty"`
	WebSocketURL         string      `yaml:"websocket_url,omitempty"`
	ReconnectBackoff     string      `yaml:"reconnect_backoff,omitempty"`      // e.g. "2s"
	MaxReconnectAttempts int         `yaml:"max_reconnect_attempts,omitempty"` // 0 = unlimited
	Version              string      `yaml:"version,omitempty"`
	SubscriptionID       string      `yaml:"subscription_id,omitempty"`
	TLS                  *TLSConfig  `yaml:"tls,omitempty"`
	Auth                 *AuthConfig `yaml:"auth,omitempty"`
}

FHIRSubscriptionListener configures FHIR R4B Subscription source (rest-hook or websocket).

type FTPConfig

type FTPConfig struct {
	Host string      `yaml:"host"`
	Port int         `yaml:"port,omitempty"`
	Auth *AuthConfig `yaml:"auth,omitempty"`
}

type FileDestConfig

type FileDestConfig struct {
	Scheme          string        `yaml:"scheme,omitempty"`
	Directory       string        `yaml:"directory,omitempty"`
	FilenamePattern string        `yaml:"filename_pattern,omitempty"`
	SFTP            *SFTPListener `yaml:"sftp,omitempty"`
}

type FileDestMapConfig

type FileDestMapConfig struct {
	Scheme          string `mapstructure:"scheme"`
	Directory       string `mapstructure:"directory"`
	FilenamePattern string `mapstructure:"filename_pattern"`
}

type FileListener

type FileListener struct {
	Scheme       string     `yaml:"scheme,omitempty"`
	Directory    string     `yaml:"directory,omitempty"`
	FilePattern  string     `yaml:"file_pattern,omitempty"`
	PollInterval string     `yaml:"poll_interval,omitempty"`
	MoveTo       string     `yaml:"move_to,omitempty"`
	ErrorDir     string     `yaml:"error_dir,omitempty"`
	SortBy       string     `yaml:"sort_by,omitempty"`
	FTP          *FTPConfig `yaml:"ftp,omitempty"`
	S3           *S3Config  `yaml:"s3,omitempty"`
	SMB          *SMBConfig `yaml:"smb,omitempty"`
}

type FileLogConfig

type FileLogConfig struct {
	Path      string `mapstructure:"path"`
	MaxSizeMB int    `mapstructure:"max_size_mb"`
	MaxFiles  int    `mapstructure:"max_files"`
	Compress  bool   `mapstructure:"compress"`
}

type GCPSecretManagerConfig

type GCPSecretManagerConfig struct {
	ProjectID       string `mapstructure:"project_id"`
	CredentialsFile string `mapstructure:"credentials_file"`
	CacheTTL        string `mapstructure:"cache_ttl"`
}

type GlobalConfig

type GlobalConfig struct {
	Hooks *GlobalHooks `mapstructure:"hooks"`
}

type GlobalHooks

type GlobalHooks struct {
	OnStartup   string `mapstructure:"on_startup"`
	OnShutdown  string `mapstructure:"on_shutdown"`
	OnDeployAll string `mapstructure:"on_deploy_all"`
}

type HTTPAuthConfig

type HTTPAuthConfig struct {
	Type           string   `mapstructure:"type" yaml:"type"`
	Token          string   `mapstructure:"token" yaml:"token"`
	Username       string   `mapstructure:"username" yaml:"username"`
	Password       string   `mapstructure:"password" yaml:"password"`
	Key            string   `mapstructure:"key" yaml:"key"`
	Header         string   `mapstructure:"header" yaml:"header"`
	QueryParam     string   `mapstructure:"query_param" yaml:"query_param"`
	TokenURL       string   `mapstructure:"token_url" yaml:"token_url"`
	ClientID       string   `mapstructure:"client_id" yaml:"client_id"`
	ClientSecret   string   `mapstructure:"client_secret" yaml:"client_secret"`
	Scopes         []string `mapstructure:"scopes" yaml:"scopes"`
	PrivateKeyFile string   `mapstructure:"private_key_file" yaml:"private_key_file"`
	Passphrase     string   `mapstructure:"passphrase" yaml:"passphrase"`
}

type HTTPDestConfig

type HTTPDestConfig struct {
	URL         string            `mapstructure:"url" yaml:"url"`
	Method      string            `mapstructure:"method" yaml:"method"`
	Headers     map[string]string `mapstructure:"headers" yaml:"headers"`
	QueryParams map[string]string `mapstructure:"query_params" yaml:"query_params"`
	PathParams  map[string]string `mapstructure:"path_params" yaml:"path_params"`
	TimeoutMs   int               `mapstructure:"timeout_ms" yaml:"timeout_ms,omitempty"`
	Auth        *HTTPAuthConfig   `mapstructure:"auth" yaml:"auth,omitempty"`
	TLS         *TLSMapConfig     `mapstructure:"tls" yaml:"tls,omitempty"`
}

type HTTPListener

type HTTPListener struct {
	Port    int         `yaml:"port"`
	Path    string      `yaml:"path,omitempty"`
	Methods []string    `yaml:"methods,omitempty"`
	TLS     *TLSConfig  `yaml:"tls,omitempty"`
	Auth    *AuthConfig `yaml:"auth,omitempty"`
}

type HealthConfig

type HealthConfig struct {
	// Bind is the interface the health server listens on. Empty means all
	// interfaces, which is what a self-hosted operator wants.
	//
	// Cloud deployments set it to 127.0.0.1: under ECS awsvpc networking every
	// listening socket is reachable on the task's own ENI, and an engine health
	// port answering to the VPC is a port the deployment manifest never
	// declared. A supervising runner proxies /health through the one control
	// port that is declared.
	Bind          string `mapstructure:"bind"`
	Port          int    `mapstructure:"port"`
	Path          string `mapstructure:"path"`
	ReadinessPath string `mapstructure:"readiness_path"`
	LivenessPath  string `mapstructure:"liveness_path"`
}

type IHEListener

type IHEListener struct {
	Profile string      `yaml:"profile"`
	Port    int         `yaml:"port"`
	TLS     *TLSConfig  `yaml:"tls,omitempty"`
	Auth    *AuthConfig `yaml:"auth,omitempty"`
}

type JMSDestConfig

type JMSDestConfig struct {
	Provider string      `yaml:"provider,omitempty"`
	URL      string      `yaml:"url,omitempty"`
	Queue    string      `yaml:"queue,omitempty"`
	Auth     *AuthConfig `yaml:"auth,omitempty"`
}

type JMSDestMapConfig

type JMSDestMapConfig struct {
	Provider  string          `mapstructure:"provider"`
	URL       string          `mapstructure:"url"`
	Queue     string          `mapstructure:"queue"`
	Auth      *HTTPAuthConfig `mapstructure:"auth"`
	TimeoutMs int             `mapstructure:"timeout_ms"`
}

type KafkaConfig

type KafkaConfig struct {
	Brokers  []string `mapstructure:"brokers"`
	ClientID string   `mapstructure:"client_id"`
}

type KafkaDestConfig

type KafkaDestConfig struct {
	Brokers  []string        `mapstructure:"brokers" yaml:"brokers"`
	Topic    string          `mapstructure:"topic" yaml:"topic"`
	ClientID string          `mapstructure:"client_id" yaml:"client_id"`
	Auth     *HTTPAuthConfig `mapstructure:"auth" yaml:"auth,omitempty"`
	TLS      *TLSMapConfig   `mapstructure:"tls" yaml:"tls,omitempty"`
}

type KafkaListener

type KafkaListener struct {
	Brokers []string    `yaml:"brokers,omitempty"`
	Topic   string      `yaml:"topic"`
	GroupID string      `yaml:"group_id,omitempty"`
	Offset  string      `yaml:"offset,omitempty"`
	Auth    *AuthConfig `yaml:"auth,omitempty"`
	TLS     *TLSConfig  `yaml:"tls,omitempty"`
}

type LDAPConfig

type LDAPConfig struct {
	URL          string `mapstructure:"url"`
	BaseDN       string `mapstructure:"base_dn"`
	BindDN       string `mapstructure:"bind_dn"`
	BindPassword string `mapstructure:"bind_password"`
}

type LifecycleConfig

type LifecycleConfig struct {
	OnDeploy   string `yaml:"on_deploy,omitempty"`
	OnUndeploy string `yaml:"on_undeploy,omitempty"`
}

type ListenerConfig

type ListenerConfig struct {
	Type             string                    `yaml:"type"`
	HTTP             *HTTPListener             `yaml:"http,omitempty"`
	TCP              *TCPListener              `yaml:"tcp,omitempty"`
	SFTP             *SFTPListener             `yaml:"sftp,omitempty"`
	File             *FileListener             `yaml:"file,omitempty"`
	Database         *DBListener               `yaml:"database,omitempty"`
	Kafka            *KafkaListener            `yaml:"kafka,omitempty"`
	Channel          *ChannelListener          `yaml:"channel,omitempty"`
	Email            *EmailListener            `yaml:"email,omitempty"`
	DICOM            *DICOMListener            `yaml:"dicom,omitempty"`
	SOAP             *SOAPListener             `yaml:"soap,omitempty"`
	FHIR             *FHIRListener             `yaml:"fhir,omitempty"`
	FHIRPoll         *FHIRPollListener         `yaml:"fhir_poll,omitempty"`
	FHIRSubscription *FHIRSubscriptionListener `yaml:"fhir_subscription,omitempty"`
	IHE              *IHEListener              `yaml:"ihe,omitempty"`
}

type Loader

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

func NewLoader

func NewLoader(root string) *Loader

func (*Loader) Load

func (l *Loader) Load(profile string) (*Config, error)

type LogTransportConfig

type LogTransportConfig struct {
	Type          string                  `mapstructure:"type"`
	CloudWatch    *CloudWatchLogConfig    `mapstructure:"cloudwatch"`
	Datadog       *DatadogLogConfig       `mapstructure:"datadog"`
	SumoLogic     *SumoLogicLogConfig     `mapstructure:"sumologic"`
	Elasticsearch *ElasticsearchLogConfig `mapstructure:"elasticsearch"`
	File          *FileLogConfig          `mapstructure:"file"`
}

type LoggingConfig

type LoggingConfig struct {
	Transports []LogTransportConfig `mapstructure:"transports"`
}

type MessageStorageConfig

type MessageStorageConfig struct {
	Driver    string                  `mapstructure:"driver"`
	Mode      string                  `mapstructure:"mode"`
	Stages    []string                `mapstructure:"stages"`
	DSN       string                  `mapstructure:"dsn"`
	Database  *StorageDatabaseConfig  `mapstructure:"database"`
	Memory    *StorageMemoryConfig    `mapstructure:"memory"`
	Postgres  *StoragePostgresConfig  `mapstructure:"postgres"`
	S3        *StorageS3Config        `mapstructure:"s3"`
	Platform  *StoragePlatformConfig  `mapstructure:"platform"`
	Retention *StorageRetentionConfig `mapstructure:"retention"`
}

type OIDCConfig

type OIDCConfig struct {
	Issuer       string `mapstructure:"issuer"`
	ClientID     string `mapstructure:"client_id"`
	ClientSecret string `mapstructure:"client_secret"`
}

type OTelConfig

type OTelConfig struct {
	Enabled            bool              `mapstructure:"enabled"`
	Endpoint           string            `mapstructure:"endpoint"`
	Protocol           string            `mapstructure:"protocol"`
	Traces             bool              `mapstructure:"traces"`
	Metrics            bool              `mapstructure:"metrics"`
	ServiceName        string            `mapstructure:"service_name"`
	ResourceAttributes map[string]string `mapstructure:"resource_attributes"`
}

type ObservabilityConfig

type ObservabilityConfig struct {
	OpenTelemetry *OTelConfig       `mapstructure:"opentelemetry"`
	Prometheus    *PrometheusConfig `mapstructure:"prometheus"`
}

type PayloadLogging

type PayloadLogging struct {
	Source      bool `yaml:"source,omitempty"`
	Transformed bool `yaml:"transformed,omitempty"`
	Sent        bool `yaml:"sent,omitempty"`
	Response    bool `yaml:"response,omitempty"`
	Filtered    bool `yaml:"filtered,omitempty"`
}

type PerformanceConfig

type PerformanceConfig struct {
	ZeroCopy         bool `yaml:"zero_copy,omitempty"`
	SyncDestinations bool `yaml:"sync_destinations,omitempty"`
}

type PipelineConfig

type PipelineConfig struct {
	Preprocessor  string `yaml:"preprocessor,omitempty"`
	Validator     string `yaml:"validator,omitempty"`
	SourceFilter  string `yaml:"source_filter,omitempty"`
	Transformer   string `yaml:"transformer,omitempty"`
	Postprocessor string `yaml:"postprocessor,omitempty"`
}

type PluginConfig added in v1.0.7

type PluginConfig struct {
	Name       string `yaml:"name"`
	Phase      string `yaml:"phase"`
	Entrypoint string `yaml:"entrypoint"`
}

PluginConfig declares a pipeline plugin registered via channel YAML.

type PrometheusConfig

type PrometheusConfig struct {
	Enabled bool   `mapstructure:"enabled"`
	Port    int    `mapstructure:"port"`
	Path    string `mapstructure:"path"`
}

type PruningConfig

type PruningConfig struct {
	Enabled              bool   `mapstructure:"enabled"`
	Schedule             string `mapstructure:"schedule"`
	DefaultRetentionDays int    `mapstructure:"default_retention_days"`
	ArchiveBeforePrune   bool   `mapstructure:"archive_before_prune"`
	ArchiveDestination   string `mapstructure:"archive_destination"`
}

type QueueConfig

type QueueConfig struct {
	Enabled  bool   `yaml:"enabled,omitempty"`
	MaxSize  int    `yaml:"max_size,omitempty"`
	Overflow string `yaml:"overflow,omitempty"`
	Persist  bool   `yaml:"persist,omitempty"`
	Threads  int    `yaml:"threads,omitempty"`
}

type RedisConfig

type RedisConfig struct {
	Address      string        `mapstructure:"address"`
	Password     string        `mapstructure:"password"`
	DB           int           `mapstructure:"db"`
	PoolSize     int           `mapstructure:"pool_size"`
	MinIdleConns int           `mapstructure:"min_idle_conns"`
	TLS          *TLSMapConfig `mapstructure:"tls"`
	KeyPrefix    string        `mapstructure:"key_prefix"`
}

type ResponseConfig

type ResponseConfig struct {
	OnSuccess           string `yaml:"on_success,omitempty"`
	OnError             string `yaml:"on_error,omitempty"`
	OnFilterDrop        string `yaml:"on_filter_drop,omitempty"`
	WaitForDestinations bool   `yaml:"wait_for_destinations,omitempty"`
}

type RetryConfig

type RetryConfig struct {
	MaxAttempts    int      `yaml:"max_attempts,omitempty"`
	Backoff        string   `yaml:"backoff,omitempty"`
	InitialDelayMs int      `yaml:"initial_delay_ms,omitempty"`
	MaxDelayMs     int      `yaml:"max_delay_ms,omitempty"`
	Jitter         bool     `yaml:"jitter,omitempty"`
	RetryOn        []string `yaml:"retry_on,omitempty"`
	NoRetryOn      []string `yaml:"no_retry_on,omitempty"`
}

type RetryMapConfig

type RetryMapConfig struct {
	MaxAttempts    int      `mapstructure:"max_attempts"`
	Backoff        string   `mapstructure:"backoff"`
	InitialDelayMs int      `mapstructure:"initial_delay_ms"`
	MaxDelayMs     int      `mapstructure:"max_delay_ms"`
	Jitter         bool     `mapstructure:"jitter"`
	RetryOn        []string `mapstructure:"retry_on"`
	NoRetryOn      []string `mapstructure:"no_retry_on"`
}

type RoleConfig

type RoleConfig struct {
	Name        string   `mapstructure:"name"`
	Permissions []string `mapstructure:"permissions"`
}

type RuntimeConfig

type RuntimeConfig struct {
	Name       string            `mapstructure:"name"`
	Profile    string            `mapstructure:"profile"`
	LogLevel   string            `mapstructure:"log_level"`
	Mode       string            `mapstructure:"mode"`
	Storage    StorageConfig     `mapstructure:"storage"`
	Encryption *EncryptionConfig `mapstructure:"encryption"`
	Health     *HealthConfig     `mapstructure:"health"`
	WorkerPool int               `mapstructure:"worker_pool"`
}

type S3Config

type S3Config struct {
	Bucket string      `yaml:"bucket"`
	Region string      `yaml:"region,omitempty"`
	Prefix string      `yaml:"prefix,omitempty"`
	Auth   *AuthConfig `yaml:"auth,omitempty"`
}

type SFTPDestMapConfig

type SFTPDestMapConfig struct {
	Host            string          `mapstructure:"host"`
	Port            int             `mapstructure:"port"`
	Directory       string          `mapstructure:"directory"`
	FilenamePattern string          `mapstructure:"filename_pattern"`
	Auth            *HTTPAuthConfig `mapstructure:"auth"`
}

type SFTPListener

type SFTPListener struct {
	Host         string      `yaml:"host"`
	Port         int         `yaml:"port,omitempty"`
	PollInterval string      `yaml:"poll_interval,omitempty"`
	Directory    string      `yaml:"directory,omitempty"`
	FilePattern  string      `yaml:"file_pattern,omitempty"`
	MoveTo       string      `yaml:"move_to,omitempty"`
	ErrorDir     string      `yaml:"error_dir,omitempty"`
	Auth         *AuthConfig `yaml:"auth,omitempty"`
	SortBy       string      `yaml:"sort_by,omitempty"`
}

type SMBConfig

type SMBConfig struct {
	Host string      `yaml:"host"`
	Auth *AuthConfig `yaml:"auth,omitempty"`
}

type SMTPDestConfig

type SMTPDestConfig struct {
	Host    string      `yaml:"host"`
	Port    int         `yaml:"port,omitempty"`
	From    string      `yaml:"from,omitempty"`
	To      []string    `yaml:"to,omitempty"`
	Subject string      `yaml:"subject,omitempty"`
	Auth    *AuthConfig `yaml:"auth,omitempty"`
	TLS     *TLSConfig  `yaml:"tls,omitempty"`
}

type SMTPDestMapConfig

type SMTPDestMapConfig struct {
	Host    string          `mapstructure:"host"`
	Port    int             `mapstructure:"port"`
	From    string          `mapstructure:"from"`
	To      []string        `mapstructure:"to"`
	Subject string          `mapstructure:"subject"`
	Auth    *HTTPAuthConfig `mapstructure:"auth"`
	TLS     *TLSMapConfig   `mapstructure:"tls"`
}

type SOAPListener

type SOAPListener struct {
	Port        int         `yaml:"port"`
	WSDLPath    string      `yaml:"wsdl_path,omitempty"`
	ServiceName string      `yaml:"service_name,omitempty"`
	TLS         *TLSConfig  `yaml:"tls,omitempty"`
	Auth        *AuthConfig `yaml:"auth,omitempty"`
}

type ScriptRef

type ScriptRef struct {
	Entrypoint string `yaml:"entrypoint,omitempty"`
}

type SecretsConfig

type SecretsConfig struct {
	Provider string                   `mapstructure:"provider"`
	Vault    *VaultConfig             `mapstructure:"vault"`
	AWS      *AWSSecretsManagerConfig `mapstructure:"aws"`
	GCP      *GCPSecretManagerConfig  `mapstructure:"gcp"`
}

type StorageConfig

type StorageConfig struct {
	Driver      string `mapstructure:"driver"`
	PostgresDSN string `mapstructure:"postgres_dsn"`
}

type StorageDatabaseConfig added in v1.0.15

type StorageDatabaseConfig struct {
	DSN          string `mapstructure:"dsn"`
	TablePrefix  string `mapstructure:"table_prefix"`
	MaxOpenConns int    `mapstructure:"max_open_conns"`
	MaxIdleConns int    `mapstructure:"max_idle_conns"`
}

StorageDatabaseConfig is a generic SQL storage config used by mysql, mssql, and sqlite drivers.

type StorageMemoryConfig added in v1.0.4

type StorageMemoryConfig struct {
	MaxRecords int `mapstructure:"max_records"`
	MaxBytes   int `mapstructure:"max_bytes"`
}

type StoragePlatformConfig added in v1.0.15

type StoragePlatformConfig struct {
	// Endpoint is the full ingest URL.
	Endpoint string `mapstructure:"endpoint"`
	// Token authenticates the deployment. It is scoped to one deployment, so a
	// leaked token cannot write another tenant's records.
	Token string `mapstructure:"token"`
	// DeploymentID is the record owner the control plane attributes writes to.
	DeploymentID string `mapstructure:"deployment_id"`
	// BatchSize is how many records accumulate before a send. Default 25.
	BatchSize int `mapstructure:"batch_size"`
	// FlushInterval is a Go duration string; a partial batch is sent when it
	// elapses. Default 2s.
	FlushInterval string `mapstructure:"flush_interval"`
}

StoragePlatformConfig configures the `platform` driver, which posts message and stage records to a managed control plane rather than storing them locally. Used by cloud deployments, where the operator surface is the platform's Messages view and the task deliberately holds no database credentials.

type StoragePostgresConfig

type StoragePostgresConfig struct {
	DSN          string `mapstructure:"dsn"`
	TablePrefix  string `mapstructure:"table_prefix"`
	MaxOpenConns int    `mapstructure:"max_open_conns"`
	MaxIdleConns int    `mapstructure:"max_idle_conns"`
}

type StorageRetentionConfig

type StorageRetentionConfig struct {
	Days                 int    `mapstructure:"days"`
	PruneInterval        string `mapstructure:"prune_interval"`
	PruneErrored         bool   `mapstructure:"prune_errored"`
	ErroredRetentionDays int    `mapstructure:"errored_retention_days"`
}

type StorageS3Config

type StorageS3Config struct {
	Bucket   string `mapstructure:"bucket"`
	Region   string `mapstructure:"region"`
	Prefix   string `mapstructure:"prefix"`
	Endpoint string `mapstructure:"endpoint"`
}

type SumoLogicLogConfig

type SumoLogicLogConfig struct {
	Endpoint       string `mapstructure:"endpoint"`
	SourceCategory string `mapstructure:"source_category"`
	SourceName     string `mapstructure:"source_name"`
}

type TCPDestConfig

type TCPDestConfig struct {
	Host      string     `yaml:"host"`
	Port      int        `yaml:"port"`
	Mode      string     `yaml:"mode,omitempty"`
	TimeoutMs int        `yaml:"timeout_ms,omitempty"`
	TLS       *TLSConfig `yaml:"tls,omitempty"`
}

type TCPDestMapConfig

type TCPDestMapConfig struct {
	Host      string        `mapstructure:"host"`
	Port      int           `mapstructure:"port"`
	Mode      string        `mapstructure:"mode"`
	TimeoutMs int           `mapstructure:"timeout_ms"`
	TLS       *TLSMapConfig `mapstructure:"tls"`
	KeepAlive bool          `mapstructure:"keep_alive"`
}

type TCPListener

type TCPListener struct {
	Port           int             `yaml:"port"`
	Mode           string          `yaml:"mode,omitempty"`
	MaxConnections int             `yaml:"max_connections,omitempty"`
	TimeoutMs      int             `yaml:"timeout_ms,omitempty"`
	TLS            *TLSConfig      `yaml:"tls,omitempty"`
	ACK            *ACKConfig      `yaml:"ack,omitempty"`
	Response       *ResponseConfig `yaml:"response,omitempty"`
}

type TLSConfig

type TLSConfig struct {
	Enabled            bool   `yaml:"enabled,omitempty"`
	CertFile           string `yaml:"cert_file,omitempty"`
	KeyFile            string `yaml:"key_file,omitempty"`
	CAFile             string `yaml:"ca_file,omitempty"`
	ClientCertFile     string `yaml:"client_cert_file,omitempty"`
	ClientKeyFile      string `yaml:"client_key_file,omitempty"`
	MinVersion         string `yaml:"min_version,omitempty"`
	ClientAuth         string `yaml:"client_auth,omitempty"`
	InsecureSkipVerify bool   `yaml:"insecure_skip_verify,omitempty"`
}

type TLSMapConfig

type TLSMapConfig struct {
	Enabled            bool   `mapstructure:"enabled" yaml:"enabled"`
	CertFile           string `mapstructure:"cert_file" yaml:"cert_file"`
	KeyFile            string `mapstructure:"key_file" yaml:"key_file"`
	CAFile             string `mapstructure:"ca_file" yaml:"ca_file"`
	ClientCertFile     string `mapstructure:"client_cert_file" yaml:"client_cert_file"`
	ClientKeyFile      string `mapstructure:"client_key_file" yaml:"client_key_file"`
	MinVersion         string `mapstructure:"min_version" yaml:"min_version"`
	InsecureSkipVerify bool   `mapstructure:"insecure_skip_verify" yaml:"insecure_skip_verify"`
}

type TenancyConfig

type TenancyConfig struct {
	Mode         string `mapstructure:"mode"`
	Isolation    string `mapstructure:"isolation"`
	TenantHeader string `mapstructure:"tenant_header"`
}

type TracingConfig

type TracingConfig struct {
	CorrelationIDHeader string `yaml:"correlation_id_header,omitempty"`
	Propagate           bool   `yaml:"propagate,omitempty"`
}

type VaultAuthConfig

type VaultAuthConfig struct {
	Type     string `mapstructure:"type"`
	RoleID   string `mapstructure:"role_id"`
	SecretID string `mapstructure:"secret_id"`
}

type VaultConfig

type VaultConfig struct {
	Address string           `mapstructure:"address"`
	Path    string           `mapstructure:"path"`
	Auth    *VaultAuthConfig `mapstructure:"auth"`
}

Jump to

Keyboard shortcuts

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