subscriptions

package
v0.0.0-...-528b95b Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Overview

Package subscriptions is a generated GoMock package.

Package subscriptions is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var ReceiverFailure = errors.New("FHIR subscription could not be delivered to receiver")

ReceiverFailure is returned when a FHIR subscription could not be delivered to the receiver, because the receiver is unreachable or didn't return a response indicating successful delivery.

View Source
var SendNotificationQueue = messaging.Entity{
	Name:   "orca.subscriptionmgr.notification",
	Prefix: true,
}

Functions

This section is empty.

Types

type Channel

type Channel interface {
	Notify(ctx context.Context, notification coolfhir.SubscriptionNotification) error
}

type ChannelFactory

type ChannelFactory interface {
	Create(ctx context.Context, subscriber fhir.Identifier) (Channel, error)
}

ChannelFactory defines an interface for creating Subscription Notification Channels (e.g. rest-hook). A notification channel is the transport that is used to deliver a Subscription Notification to a subscriber.

type CsdChannelFactory

type CsdChannelFactory struct {
	Profile profile.Provider
}

CsdChannelFactory is a ChannelFactory that creates subscription notification channels based on the CSD directory. In other words, it looks up the subscriber endpoint in an external registry, the CSD. This is typically for out-of-band server-managed FHIR subscriptions.

func (CsdChannelFactory) Create

func (c CsdChannelFactory) Create(ctx context.Context, subscriber fhir.Identifier) (Channel, error)

type InProcessChannelFactory

type InProcessChannelFactory struct {
	Profile               profile.Provider
	DefaultChannelFactory ChannelFactory
}

InProcessChannelFactory is a ChannelFactory that creates subscription notification channels on the following order of preference: - InProcessPubSubChannel: if the subscriber is in the same process (if the target CPC also runs this CPS). - DefaultChannelFactory: use this ChannelFactory otherwise.

func (InProcessChannelFactory) Create

func (d InProcessChannelFactory) Create(ctx context.Context, subscriber fhir.Identifier) (Channel, error)

type InProcessPubSubChannel

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

func (InProcessPubSubChannel) Notify

type Manager

type Manager interface {
	Notify(ctx context.Context, resource interface{}) error
}

type MockChannel

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

MockChannel is a mock of Channel interface.

func NewMockChannel

func NewMockChannel(ctrl *gomock.Controller) *MockChannel

NewMockChannel creates a new mock instance.

func (*MockChannel) EXPECT

func (m *MockChannel) EXPECT() *MockChannelMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockChannel) Notify

func (m *MockChannel) Notify(ctx context.Context, notification coolfhir.SubscriptionNotification) error

Notify mocks base method.

type MockChannelFactory

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

MockChannelFactory is a mock of ChannelFactory interface.

func NewMockChannelFactory

func NewMockChannelFactory(ctrl *gomock.Controller) *MockChannelFactory

NewMockChannelFactory creates a new mock instance.

func (*MockChannelFactory) Create

func (m *MockChannelFactory) Create(ctx context.Context, subscriber fhir.Identifier) (Channel, error)

Create mocks base method.

func (*MockChannelFactory) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockChannelFactoryMockRecorder

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

MockChannelFactoryMockRecorder is the mock recorder for MockChannelFactory.

func (*MockChannelFactoryMockRecorder) Create

func (mr *MockChannelFactoryMockRecorder) Create(ctx, subscriber any) *gomock.Call

Create indicates an expected call of Create.

type MockChannelMockRecorder

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

MockChannelMockRecorder is the mock recorder for MockChannel.

func (*MockChannelMockRecorder) Notify

func (mr *MockChannelMockRecorder) Notify(ctx, notification any) *gomock.Call

Notify indicates an expected call of Notify.

type MockManager

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

MockManager is a mock of Manager interface.

func NewMockManager

func NewMockManager(ctrl *gomock.Controller) *MockManager

NewMockManager creates a new mock instance.

func (*MockManager) EXPECT

func (m *MockManager) EXPECT() *MockManagerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockManager) Notify

func (m *MockManager) Notify(ctx context.Context, resource any) error

Notify mocks base method.

type MockManagerMockRecorder

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

MockManagerMockRecorder is the mock recorder for MockManager.

func (*MockManagerMockRecorder) Notify

func (mr *MockManagerMockRecorder) Notify(ctx, resource any) *gomock.Call

Notify indicates an expected call of Notify.

type NotificationEvent

type NotificationEvent struct {
	Subscriber fhir.Identifier `json:"subscriber"`
	Focus      fhir.Reference  `json:"focus"`
	TenantID   string          `json:"tenant_id"`
}

type RestHookChannel

type RestHookChannel struct {
	Endpoint string
	Client   fhirclient.HttpRequestDoer
}

func (RestHookChannel) Notify

type RetryableManager

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

RetryableManager is a Manager derives Subscriptions from the properties of FHIR resource that triggered the notification: - Task: it notifies the Task filler and owner - CareTeam: it notifies all participants TODO: It does not yet store the subscription notifications in the FHIR store, which is required to support monotonically increasing event numbers.

func NewManager

func NewManager(cpsBaseURLFunc func(tenants.Properties) *url.URL, tenants tenants.Config, channels ChannelFactory, messageBroker messaging.Broker) (*RetryableManager, error)

func (RetryableManager) Notify

func (r RetryableManager) Notify(ctx context.Context, resource interface{}) error

Jump to

Keyboard shortcuts

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