Documentation
¶
Index ¶
- Constants
- Variables
- func From(source BrokerOptionsGetter) shoot.Option[BrokerOptions, *BrokerOptions]
- func HandleTopic[T any](handler ingap.Handler[T], topic string) shoot.Option[BrokerOptions, *BrokerOptions]
- func HandleTopicWithinGroup[T any](group, topic string, handler ingap.Handler[T]) shoot.Option[BrokerOptions, *BrokerOptions]
- func Register(opts ...shoot.Option[BrokerOptions, *BrokerOptions])
- type BrokerOptions
- type BrokerOptionsGetter
- type Event
- type EventPublisher
- type Gap
- func (g *Gap) DashboardHandler() http.Handler
- func (g *Gap) NewEventPublisher(opts ...shoot.Option[BrokerOptions, *BrokerOptions]) EventPublisher
- func (g *Gap) NewPublisher[T any](opts ...shoot.Option[BrokerOptions, *BrokerOptions]) Publisher[T]
- func (g *Gap) Shutdown(ctx context.Context) error
- func (g *Gap) Subscribe(opts ...shoot.Option[BrokerOptions, *BrokerOptions])
- type Handler
- type Options
- type OptionsGetter
- type Publisher
- type Txer
Constants ¶
View Source
const ( KeysMessageID = internal.KeysMessageID KeysMessageType = internal.KeysMessageType KeysGroup = internal.KeysGroup KeysCorrelationID = internal.KeysCorrelationID KeysBrokerName = internal.KeysBrokerName KeysBrokerType = internal.KeysBrokerType )
Variables ¶
View Source
var ( Version = ingap.Version ServiceName = ingap.ServiceName DefaultGroup = ingap.DefaultGroup WorkerID = ingap.WorkerID ClaimBatchSize = ingap.ClaimBatchSize MaxRetries = ingap.MaxRetries LeaseTTLSeconds = ingap.LeaseTTLSeconds RetryIntervalSeconds = ingap.RetryIntervalSeconds PumpIntervalSeconds = ingap.PumpIntervalSeconds MaxPublishConcurrency = ingap.MaxPublishConcurrency PublishBufferSize = ingap.PublishBufferSize WorkConcurrencyFactor = ingap.WorkConcurrencyFactor UseDashboard = ingap.UseDashboard Inject = ingap.Inject BrokerName = ingap.BrokerName ErrRuntimeStopping = ingap.ErrRuntimeStopping )
View Source
var Pair = internal.Pair
Functions ¶
func From ¶
func From(source BrokerOptionsGetter) shoot.Option[BrokerOptions, *BrokerOptions]
From copies a publisher's broker configuration into a broker option. It lets a subscriber reuse the configuration owned by that publisher.
func HandleTopic ¶
func HandleTopic[T any](handler ingap.Handler[T], topic string) shoot.Option[BrokerOptions, *BrokerOptions]
func HandleTopicWithinGroup ¶
func HandleTopicWithinGroup[T any](group, topic string, handler ingap.Handler[T]) shoot.Option[BrokerOptions, *BrokerOptions]
func Register ¶
func Register(opts ...shoot.Option[BrokerOptions, *BrokerOptions])
Register stores generated handler and dependency definitions during package initialization. Applications start them with Gap.Subscribe.
Types ¶
type BrokerOptions ¶
type BrokerOptions = ingap.BrokerOptions
type BrokerOptionsGetter ¶
type BrokerOptionsGetter internal.BrokerOptionsGetter
type EventPublisher ¶
type EventPublisher = internal.EventPublisher
func NewEventPublisher ¶
func NewEventPublisher(g *Gap, opts ...shoot.Option[BrokerOptions, *BrokerOptions]) EventPublisher
type Gap ¶
type Gap struct {
// contains filtered or unexported fields
}
Gap owns the shared storage, pump, dashboard, subscriptions, and lifecycle of an application. Publishers and subscribers supply their broker-specific configuration independently.
func (*Gap) DashboardHandler ¶
func (*Gap) NewEventPublisher ¶
func (g *Gap) NewEventPublisher(opts ...shoot.Option[BrokerOptions, *BrokerOptions]) EventPublisher
func (*Gap) NewPublisher ¶
func (g *Gap) NewPublisher[T any](opts ...shoot.Option[BrokerOptions, *BrokerOptions]) Publisher[T]
func (*Gap) Shutdown ¶
Shutdown stops intake, drains accepted work, cancels work that exceeds ctx, and closes runtime-owned resources. It is safe to call more than once.
func (*Gap) Subscribe ¶
func (g *Gap) Subscribe(opts ...shoot.Option[BrokerOptions, *BrokerOptions])
Subscribe configures the broker and registers all configured handlers.
type OptionsGetter ¶
type OptionsGetter internal.OptionsGetter
type Publisher ¶
func NewPublisher ¶
func NewPublisher[T any](g *Gap, opts ...shoot.Option[BrokerOptions, *BrokerOptions]) Publisher[T]
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
