Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PublishAndWait ¶ added in v0.0.14
func PublishAndWait(ctx context.Context, bus HostRegistrationBus, bundle URLBundle) error
PublishAndWait delivers a bundle through an acknowledgement-aware bus and waits until its subscriber has completed processing. Ordinary HostRegistrationBus implementations remain valid; callers that need the stricter startup barrier receive a generic error when the capability is not available.
func SupportsAcknowledgement ¶ added in v0.0.14
func SupportsAcknowledgement(bus HostRegistrationBus) bool
SupportsAcknowledgement reports whether bus can provide the stricter startup publication barrier. Callers that receive false must retain the ordinary Publish path rather than making this additive capability mandatory.
Types ¶
type HostRegistrationBus ¶
type HostRegistrationBus interface {
Publish(ctx context.Context, bundle URLBundle) error
Close() error
}
HostRegistrationBus is the public interface for publishing URL bundles. Implementations are package-private to prevent external construction.
func New ¶
func New(subscriber chan URLBundle) (HostRegistrationBus, error)
New constructs a new host registration bus with the provided subscriber channel.
type StartupCatalogState ¶ added in v0.0.14
type StartupCatalogState struct {
// contains filtered or unexported fields
}
StartupCatalogState is a one-shot barrier for startup catalog completion. It is intentionally separate from readiness state: callers may wait for a stricter startup milestone without changing existing health semantics.
func NewStartupCatalogState ¶ added in v0.0.14
func NewStartupCatalogState() *StartupCatalogState
NewStartupCatalogState constructs an unset startup catalog barrier.
func (*StartupCatalogState) Complete ¶ added in v0.0.14
func (s *StartupCatalogState) Complete(err error)
Complete settles the startup catalog barrier. The first result wins.
type URLBundle ¶
type URLBundle struct {
FetchedAt time.Time
URLs []URLRecord
// contains filtered or unexported fields
}
URLBundle captures a set of URLs discovered by any component. It keeps transport hints generic and intentionally avoids OAuth-specific fields.
func (URLBundle) Acknowledge ¶ added in v0.0.14
Acknowledge reports that a subscriber has finished processing a bundle. It is a no-op for bundles delivered through Publish and only the first acknowledgement is observed for bundles delivered through PublishAndWait.
func (URLBundle) AcknowledgeAfter ¶ added in v0.0.14
AcknowledgeAfter runs beforeAck immediately before acknowledging a PublishAndWait bundle. The callback is skipped for ordinary Publish bundles, which lets subscribers attach startup-only finalization work without changing fire-and-forget publication behavior.
func (URLBundle) RequiresAcknowledgement ¶ added in v0.0.14
RequiresAcknowledgement reports whether this bundle came from the stricter startup publication path. It exposes no bundle contents and lets the single subscriber keep ordinary later publications outside the startup boundary.
type URLRecord ¶
type URLRecord struct {
URL *url.URL
Description string
Tags []Tag
UnixSocketPath string
// DisallowPrivateHostRegistration prevents this record from being admitted
// as a private-host target or seeding OAuth protected-resource host policy.
// An exact trusted protected-resource origin may still admit the record.
DisallowPrivateHostRegistration bool
}
URLRecord describes a single URL plus optional metadata tags.